Hello! So, I'm no scripter at all, but I know a few basics. I'm trying to make a stats Gui for my place. Here's a Gyazo of the Guis I'm working with here, so it doesn't confuse you. http://gyazo.com/387a1534107ac3a84f1f4e4907d5f202
The only problem is, it's not working. I don't know how to script much, but I thought I would try working with Guis. Obviously, it was a mistake. Here's the code I wrote out.
Oh, and the Value type I'm using is a NumberValue, "0" representing that the Stats Gui is currently closed, "1" representing that it is currently open.
function onClicked()
open = script.Parent.Open
if open.Value == "1" then
script.Parent.Parent.Stats.Visible = false
script.Parent.Text = "Open Stats"
else
open.Value = "1"
script.Parent.Parent.Stats.Visible = true
script.Parent.Text = "Close Stats"
end
end
game.StarterGui.ScreenGui.TextButton.Clicked:Connect(onClicked)
I need help fixing it, I don't know what's wrong. Try not to rewrite the whole thing, and explain as much as you can so I can understand what I did wrong.
Thanks!
