Hello, currently I have a problem where I can’t open a gui/tween a gui it responds with no inputs too.
Script:
--Open and Close
for _,object in pairs(script.Parent:GetChildren()) do
print(Object.Name)
if object:IsA("ScreenGui") and object:FindFirstChild("BackgroundFrame") then
local Open = object:WaitForChild("OpenFrame"):WaitForChild("OpenButton")
local Background = object:WaitForChild("BackgroundFrame")
if Open and Background then
Open.MouseButton1Up:Connect(function()
print("Clicked")
end)
end
end
end
Here’s how my gui is set up:
Here’s what is prints out:
Maybe the problem is the way you are checking the objects.
Try using this code:
local plrGui = script.Parent -- assuming that this script is in PlayerGui
for _, object in pairs(plrGui:GetChildren()) do
if object:IsA("ScreenGui") and object.Name == ShopGui then
local Back = object:FindFirstChild("BackgroundFrame")
local Open = object:FindFirstChild("OpenFrame")
if Back and Open then
Open.OpenButton.Activated:Connect(function()
print("Clicked")
end)
end
end
end
Still no input, here’s a link to it if you want to test it out for yourself. https://www.roblox.com/library/8923612522/ShopGui
I wasn’t able to make download cause my pc can’t handle it sorry.
Edit:
I forgot to put the script mb.