I've been having an issue where I get the Script timeout: exhausted allowed execution time error. Can someone point me in the right direction?
repeat if game.Workspace.Dummy4.Humanoid.Health < 100 then game.Workspace.Dummy4.Humanoid.Health = 60 end until game.Workspace.Dummy4.Humanoid.Health == 0
The problem you have here is that you never added a wait!
However; there's a more efficient way of writing this code!
game.Workspace.Dummy.Humanoid.HealthChanged:Connect(function(Health) if Health <= 100 then if Health <= 0 then else Health = 60 end end end)
This should work; if it doesn't use this instead:
repeat if game.Workspace.Dummy4.Humanoid.Health < 100 then game.Workspace.Dummy4.Humanoid.Health = 60 end wait() until game.Workspace.Dummy4.Humanoid.Health == 0