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

"Worked" shows up in output but the now enabled script dosent work?

Asked by 4 years ago
Edited 4 years ago

So this script gets a local script in starter GUI, except when I click it the output says it worked, but the script dosent get disabled. However thogh, if theres a normal script in workspace with the code:

game.StarterGui.Script.Disabled = true

it works! how ever, if I use a click detector and use this script:

local function OnClick(hi)

game.StarterGui.Script.Disabled = false
print("worked")
end


script.Parent.ClickDetector.MouseClick:connect(OnClick) 

it dosent work. please help!

2 answers

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

you wrote it wrong.

local function OnClick()
    game.StarterGui.Script.Enabled = false
    print("worked")
end
game.StarterGui.Script.Disabled = false
0
You wrote it wrong too. Script don't have 'enabled', it only have Disabled Xapelize 2658 — 4y
0
That is wrong aswell. Disabled or Enabled may exist JACK! snowwyyyyy2 30 — 4y
Ad
Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
4 years ago

You did wrong at line 3, why do you need to make the script.Disabled = false? You just make it Enabled.

Replace this to line 3 :

game.StarterGui.Script.Disabled = true

Hope I helped and bye! :3

Answer this question