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

Infinite Yield on :WaitForChild("MobileMoveHotbar")?

Asked by
Despayr 505 Moderation Voter
6 years ago
Edited 6 years ago
local MoveHotbar1 = Player1.PlayerGui:WaitForChild("MobileMoveHotbar")
local MoveHotbar2 = Player2.PlayerGui:WaitForChild("MobileMoveHotbar")
wait(1)
local Particle1 = script.Particles:Clone()
local Particle2 = script.Particles:Clone()
wait(1)
Particle1.Parent = MoveHotbar1
Particle2.parent = MoveHotbar2

The Output: "Infinite Yield on Player1.PlayerGui:WaitForChild("MobileMoveHotbar")" "Infinite Yield on Player2.PlayerGui:WaitForChild("MobileMoveHotbar")"

Is there anyway around this? It can not find the Gui, but I assure you it is there.

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

This can happen if you are using the code in a regular script, if this is the case then consider moving the source code to a LocalScript.

Ad

Answer this question