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

Hello, I want to make sure that when all the players are dead then the game restarts a game?

Asked by 3 years ago
Edited 3 years ago

I have already tried a script but it doesn't work and the output doesn't give me an error:

01local IntermissionValue = game.ReplicatedStorage.Intermission
02local map1 = game.Workspace.map1 or game.ReplicatedStorage.Maps.map1
03local Clown = game.ReplicatedStorage.Clown or map1.Clown
04local PlayerValue = game.ReplicatedStorage.PlayerValue
05local DiedValue = game.ReplicatedStorage.DiedValue
06 
07game.Players.PlayerAdded:Connect(function(player)
08    player.CharacterAdded:Connect(function(character)
09        character:WaitForChild("Humanoid").Died:Connect(function()
10            if PlayerValue == 1 then
11                IntermissionValue.Value = 30
12                map1.Parent = game.ReplicatedStorage.Maps
13                Clown.Parent = game.ReplicatedStorage
14            else
15                if DiedValue == PlayerValue then
View all 23 lines...
0
Im here waiting Roblox28721 10 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Where did you put the script and what kind of script is it?

0
in serverstorage and it is a normal script creepycanary 12 — 3y
0
this should be a comment but ok Xapelize 2658 — 3y
0
Try putting it in ServerScriptService, I think that should work. Roblox28721 10 — 3y
Ad

Answer this question