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

How to fix an infinite yield in a click detector script?

Asked by 4 years ago

Infinite yield possible on 'Workspace.AoTCannonbyToadion:WaitForChild("ClickDetector")'

Can anyone tell me how to fix this or at least what may be causing the problem?

0
Make sure there's actually a ClickDetector inside of AoTCannonbyToadion. xPolarium 1388 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

infinite yield means that roblox couldn't find it, and it gave up on waiting for it. Make sure there is a click detector in the part. Or, you could make one in the script.

local click=Instance.new("ClickDetector")
click.Parent=script.Parent
--rest of the stuff here, you can reference the detector as 'click'
0
Thank you that worked! Hex_0517 10 — 4y
Ad

Answer this question