Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make certain scripts run again, after the player finishes the track?

Asked by
Oficcer_F 207 Moderation Voter
6 years ago

I have a labyrinth game, and people that play it always complain, that they have to rejoin, to play it again. So I made a Rejoin button. But still, you have to rejoin. How can I do that they click a button and the game goes from the start again?

1 answer

Log in to vote
0
Answered by 6 years ago

Hi there! here is a local script that you could place in your rejoin button:

script.Parent.MouseButton1Click:Connect(function()
    game.Players.LocalPlayer.Character["Humanoid"].Health = 0
end)

This should reset the PlayerGui and the local scripts, although this wouldn't reset the scripts. It shouldn't reset any scripts, because they are server-sided, and would reset every player's game as well.

Ad

Answer this question