I'm making a i'm making a tower game, so i added a noclip tool in serverStorage which will be given to players if they're a dev. Thing is, the tool isn't being given to the player.
This is the script currently (names hidden because yes):
local Players = game:GetService("Players")
local tool = game.ServerStorage.Noclip
local devs = {
["name"] = true,
["name"] = true,
["name"] = true,
["name"] = true,
["name"] = tru
}
local function isDeveloper(player)
return devs[player.Name] == true
end
local function giveTool(player, tool)
local backpack = player:FindFirstChildOfClass("Backpack")
if backpack then
tool.Parent = backpack
end
end
Players.PlayerAdded:Connect(function(player)
local playerJoined = player.name
if isDeveloper(player) then
game.ReplicatedStorage.BellSfxEvent:FireAllClients()
giveTool(player,tool)
end
end)
Any ideas as to why it's not working? This is a server script in ServerScriptService btw.
** You are now Level 1! **