Hi, Im having trouble on obtaining this script
A script that gives VIP tools DIRECTLY ON SPAWN but it has to be detected by name. not T-Shirts and not Gamepasses
Hi, Im having trouble on obtaining this script
A script that gives VIP tools DIRECTLY ON SPAWN but it has to be detected by name. not T-Shirts and not Gamepasses
local vips = { --vip table
"ForeverDev",
"Revenant101"
}
local toolsToGive = { --all the tools you want the vip to receive when they spawn
game.Lighting.Tool1:clone(),
game.Lighting.Tool2:clone()
}
game.Players.PlayerAdded:connect(function(player) --fires when a new player joins the game
player.CharacterAdded:connect(function(char) --fires when the player spawns
for i, v in pairs(vips) do --iterate through the vip table
if v:lower() == player.Name:lower() then --if the player is found in the vip table
for t, o in pairs(toolsToGive) do --iterate through the tools table
o:clone().Parent = player.Backpack --clone the tool and put it in the backpack
end
end
end
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
I does not work. I changed tool1 and 2 to the name of the tools in my game but it dosent give it.