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

Trying to make my first tool, Infinite yield ocurred?

Asked by 4 years ago
Edited by royaltoe 4 years ago

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)`
0
OOPS, the code didnt fit, sorry about that ceyhunveysel 28 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

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
yeah ^^ roblox is case sensitive, if you're ever unsure of what something is called, go look in the explorer yourself. royaltoe 5144 — 4y
Ad

Answer this question