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

Why won't this script work?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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)
0
Please use the code block (the lua symbol) and make your code more readable. Otherwise, no-one can help you. DevChris 235 — 9y
0
Thank you. Noobegai -4 — 9y
0
Is it in a LocalScript? DevChris 235 — 9y
0
yes Noobegai -4 — 9y
View all comments (4 more)
0
Oh wait, I tested it in a normal script and it worked! Noobegai -4 — 9y
0
Put [solved] at the end of your question, so we know that you found your solution Shawnyg 4330 — 9y
0
You should NOT use a normal script for guis ever! Perci1 4988 — 9y
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 buoyantair 123 — 9y

Answer this question