This is the loop i want to repeat on a players death:
wait(1)
for i = 0,10,1 do
Lava.Size = Vector3.new(380.5,0.5+i,2318)
wait(.2)
end
This is the loop i want to repeat on a players death:
wait(1)
for i = 0,10,1 do
Lava.Size = Vector3.new(380.5,0.5+i,2318)
wait(.2)
end
Try using this function and add your loop to it
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
print(player.Name .. " has died!")
end)
end)
end)
game.Players.PlayerAdded:connect(function(plr) for i = 0,10,1 do Lava.Size = Vector3.new(380.5,0.5+i,2318) wait(.2) end end)
does this make the loop start from the beginning?
it runs the loop when the player dies
how do I make it run first and then it runs again if a player dies
oh! let me edit it
parent it inside of starterpack. put it in a normal script
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
where do I add the loop?
Where the print is.