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)