Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Infinite loop on reset? (Your title should be specific! Describe your problem concisely.)

Hi,

I've made an attack tool with animations which works perfectly fine, but thanks to the issue of LoadAnimation requiring the Humanoid object to be a descendant of the game despite waiting, I had to put this code:

while Character.Parent == nil do Character.AncestryChanged:Wait() end
print('Loaded')

In studio when the player enters the game the code prints Loaded, but when the player dies and respawns it never prints loaded and is stuck in an infinite loop

How can I fix this problem??

1 answer

Maybe you should try a

while true do 
- - kind of loop 
for I, v in pairs 
- - second loop

1 comment

0

Doesn't work

This discussion is preserved as it was. New answers, comments, and votes are closed.