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

What is wrong with this ClickDetector script?

Asked by 8 years ago
function open()
    script.Parent.Parent.Parent.Parent.Items.NightVision.Value = true
    game.StarterGui.ToolBar.Inventory.NIGHTVISION.nv.Value = true
end
script.Parent.MouseClick:connect(open)

For some reason, the script isn't working... can anyone figure it out? Thanks! (Sorry for my -7 reputation... a lot of people have been down voting my stuff for no reason)

0
Upvote to get you back on track. Just remember to keep your questions relevant and to have an honest attempt! Can you tell me where this script is located? DigitalVeer 1473 — 8y
0
I will put a link into this post for the location. PyccknnXakep 1225 — 8y

1 answer

Log in to vote
3
Answered by 8 years ago

Possibility 1: You are not getting to the value correctly Possibility 2: The NightVision value is not a BoolValue Possibility 3: You might be trying to access the player's backpack; not the StarterPack.

If Possibility 3 is correct, please tell me and I will try to write a code for you below.

If my answer helped you, accept and upvote it.

Ad

Answer this question