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

Simple Gui Problem?

function onClicked()
	script.Parent.Parent.Fight.Visible = true
end

script.Parent.MouseButton1Down:connect(onClicked)

So, I want the above script to make a frame visible, it is in a local script, but, It does nothing when I press the button...

EDIT: Should probably add in this detail: The script works fine in studio, buts when playing the game on roblox it self, doesn't work.

1 comment

0

Any errors?

1 answer

script.Parent.MouseButton1Click:connect(function()
print("Clicked")
	script.Parent.Parent:WaitForChild("Fight")
print("Found Fight")
    script.Parent.Parent.Fight.Visible = true
print("Visible")
end)



Ok, so I edited it a bit. I added a WaitForChild just in case it isnt loading or anything.

I also added prints. If you go into the game and press F9, it shows a little output and can tell you any errors. Comment back on what prints/doesnt print.

3 comments

0

So, I loaded the console, again, the frame doesn't become visible, but, I do get all the output in the console.

0

What is Fight? is it a frame, or what.

0

A frame.

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