I know some part of the script ~~~~~~~~~~~~~~~~~ function onPlayerEnter:connect
I think XD
I know some part of the script ~~~~~~~~~~~~~~~~~ function onPlayerEnter:connect
I think XD
The event you are looking for is PlayerAdded:
Names = {"PlayerNameHere"}
game:GetService("Players").PlayerAdded:connect(function(Plr)
wait(1/30)
for _,v in next, Names do
if v:lower() == Plr.Name:lower() then
--Stuff happens here
--Example: Plr.Character:BreakJoints()
end
end
end)
Use this example instead, it is more safer.
game.Players.PlayerAdded:connect(function(player)
repeat wait() until player ~= nil
-- code here :)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
That's close to what i need I really need if the players name is in the script so and so happens
Edited it so that if your username in in the table, only then does stuff happen.