#i don't know how to make it so only 1 player is able to use a tool

1 messages · Page 1 of 1 (latest)

feral dragon
#

the code is

local players = {"506281754"}
local gear = game.ServerStorage.Heal

game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(chr)
        for i = 1, #players do
            if players{i} == plr.UserId then
                gear:Clone().Parent = plr:WaitForChild("Backpack")
            end

        end

    end)

end)

no errors show up in the output and the script is in starterplayerscripts

verbal stirrupBOT
#

studio** You are now Level 1! **studio

feral dragon
#

i don't know how to make it so only 1 player is able to use a tool

leaden sentinel
feral dragon
leaden sentinel
feral dragon
#

it now says that Heal isn't a valid member in serverstorage

#

it is in serverstorage

leaden sentinel
feral dragon
#

it's a localscript

prisma nacelle
leaden sentinel
# feral dragon it's a localscript

LocalScripts do not have access to ServerStorage on the server. To the client, nothing is there.

Make this script a server script instead and put it in ServerScript service