1 | function onClicked() |
2 | script.Parent.Parent.Fight.Visible = true |
3 | end |
4 |
5 | script.Parent.MouseButton 1 Down: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 | script.Parent.MouseButton 1 Click:connect( function () |
2 | print ( "Clicked" ) |
3 | script.Parent.Parent:WaitForChild( "Fight" ) |
4 | print ( "Found Fight" ) |
5 | script.Parent.Parent.Fight.Visible = true |
6 | print ( "Visible" ) |
7 | 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.