Just trying to make a gui, a button that opens a menu with 3 more buttons, 1 to kill all, explode all and fling all. It should cost robux to do each. I currently already have a working invite button.
The issue is I am met with 2 errors:
Infinite yield possible on 'Players.theLord8.PlayerGui:WaitForChild("TrollButton")' - Studio
and
Script 'Players.theLord8.PlayerGui.ScreenGui.LocalScript', Line 7 - Studio - LocalScript:7
In testing, I can open the menu, but clicking on any of the kill/explode/fling buttons doesnt give the robux prompt.
I added the image of my explorer page of how i ordered everything.
It has 2 localscipts and there is 1 serverscript
Here they are:
LocalScript for button to open menu called opentroll
local Frame = SGui:WaitForChild("MenuFrame")
local Button = SGui:WaitForChild("TrollButton")
local KillButton = Frame:WaitForChild("KillButton")
local ExplodeButton = Frame:WaitForChild("ExplodeButton")
local FlingButton = Frame:WaitForChild("FlingButton")
Button.MouseButton1Up:Connect(function()
Frame.Visible = not Frame.Visible
print("MenuFrame visible: " .. tostring(Frame.Visible)) -- Debugging line to confirm visibility toggle
end)
-- Add functionality to each action button (optional for testing)
KillButton.MouseButton1Click:Connect(function()
print("Kill action triggered!")
-- Implement the action here (e.g., kill all players)
end)
ExplodeButton.MouseButton1Click:Connect(function()
print("Explode action triggered!")
-- Implement the action here (e.g., explode all players)
end)
FlingButton.MouseButton1Click:Connect(function()
print("Fling action triggered!")
-- Implement the action here (e.g., fling all players)
end)```
I will send the other 2 scripts in message below
** You are now Level 1! **