I'm making a little project that activates when a player joins, the problem is that when another player joins the script runs double and the device goes bad, How can i make the event only run once?
Use
Game.Players.PlayerAdded:wait()
This waits for the PlayerAdded event to fire, then continues with the script. Alternatively, if you need to use the Player use the following:
local connection = "Connection" connection = Game.Players.PlayerAdded:connect(function(Player) connection:disconnect() end)