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

How do you make it so the script doesn't reset when someone resets?

Asked by 8 years ago

Question may be a little vague. So what is happening is that in this script, if you happen to die, it just restarts but it shouldn't be doing that. It should be going along with everyone else. If someone already at the map but someone just died, the player has to go through the whole thing again. If you die at the timer part, you should go back to the timer, not the beginning.

game.Players.PlayerAdded:connect(function(Player)
    wait(1)
local hint = Player.PlayerGui.Talker.Frame.TextLabel
local floor = game.Workspace.Floor
local servertime = 20
local gamewait = 30
local gameplay = 120
print(Player.Name)
hint.Text = "Welcome! Please wait as we get started!"
print ('Do do do')
wait (5)
hint.Text = "You have "..servertime.." seconds to prepare!"
for i=1, 20 do 
    wait(1)
    servertime=servertime -1
    hint.Text = "You have "..servertime.." seconds to prepare!"
if servertime == 0 then
wait (2)
hint.Text = "Are you ready? We are now starting!"
wait (3)
hint.Text = "Please wait..."
local k = game.ServerStorage.NatureS:Clone()
if game.Workspace:FindFirstChild("NatureS") then
    print("Already Here")
else
    k.Parent = game.Workspace
end
wait(.5)
hint.Text = "Map loaded! Have fun!"
end
end
end)

Answer this question