It only works in studio, and won't give me an error.

GUs = 0
Level = 1
TKills = 0
Menu = script.Parent
MenuB = script.Parent.Parent.Menu
GUsT = script.Parent.GUs
LevelT = script.Parent.Level
TKillsT = script.Parent.TKills
Open = false

MenuB.MouseButton1Down:connect(function(open)
	if Open == false then
		Menu.Visible = false
		MenuB.Text = "Open Menu"
		Open = true
		GUsT.Text = "Galactic Units: " ..GUs
		LevelT.Text = "Level: " ..Level
		TKillsT.Text = "Total Kills: " ..TKills
	elseif Open == true then
		Menu.Visible = true
		MenuB.Text = "Close Menu"
		Open = false
	end
end)

8 comments

0

Please use the code block (the lua symbol) and make your code more readable. Otherwise, no-one can help you.

0

Thank you.

0

Is it in a LocalScript?

0

yes

0

Oh wait, I tested it in a normal script and it worked!

0

Put [solved] at the end of your question, so we know that you found your solution

0

You should NOT use a normal script for guis ever!

0

Yes, Do not use Normal scripts for GUIs Unless your GUIs are meant to do something with the server, though now you can use Remote events :D