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

Simple Gui Problem?

Asked by 10 years ago
1function onClicked()
2    script.Parent.Parent.Fight.Visible = true
3end
4 
5script.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.

0
Any errors? GoldenPhysics 474 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago
1script.Parent.MouseButton1Click:connect(function()
2print("Clicked")
3    script.Parent.Parent:WaitForChild("Fight")
4print("Found Fight")
5    script.Parent.Parent.Fight.Visible = true
6print("Visible")
7end)

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.

0
So, I loaded the console, again, the frame doesn't become visible, but, I do get all the output in the console. notRezznov 35 — 10y
0
What is Fight? is it a frame, or what. Tempestatem 884 — 10y
0
A frame. notRezznov 35 — 10y
Ad

Answer this question