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

Trying to make my first tool, Infinite yield ocurred?

This script doesnt work saying Infinite yield possible on 'Players.ceyhunveysel:WaitForChild("PlayerGUI")... Thanks so much if you could help any little bit! I'm tryna make a tool (my first design) so...

`local answers = {
	"Roblox was created in 2006.",
	"erik.cassel was a cool guy! Sad that he died.",
	"Did you know that builderman was David Baszucki?",
	"Builderman now plays in david.baszucki!",
	"YouTube has some secret no titled videos in it! Go try to find one.",
	"Go play Sword Fight Tournament by TheGamer101! It's an old good game!",
	"Toby Fox, AKA. Annoying Dog made Undertale! I'm pretty sure you know that, but yeah.",
	"On your next life, use No more.",
	"Sometimes the only choice is Fight Back...",
	"A joke isn't always a joke from your friend! Maybe he's bullying! Be sure!",
	"Joke is small. But a prank is higher meaning!",
	"Roblox is getting sued for stealing Uuhhh from Messiah... Sad!",
	"RIP XXTentacion... <3"
	}

local player = game.Players.LocalPlayer
local PlayerGUI = player:WaitForChild("PlayerGUI")
script.Parent.Activated:Connect(function()
	local BallGUI = script.Parent.GUI:Clone()
	BallGUI.Parent = PlayerGUI
	BallGUI.BallFrame.BallTruth.Text = answers[math.random(0, #answers)]
end)
script.Parent.Unequipped:Connect(function()
	if PlayerGUI.BallGUI == not nil then
		player.PlayerGUI.BallGUI:Destroy()
	end
end)`

1 comment

0

OOPS, the code didnt fit, sorry about that

1 answer

✓ Accepted answer

The problem is that you're trying to wait for "PlayerGUI" but it's actually called "PlayerGui"

So it's waiting for something that will never exist.

1 comment

1

yeah ^^ roblox is case sensitive, if you're ever unsure of what something is called, go look in the explorer yourself.

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