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

How do I make a script change a bool value?

Asked by 6 years ago

I would like to know how to do this so I can make the c-frame arm go when I press a button. (The arm works if the value is changed manually)

Script that does not change the value

script.Parent.MouseClick:connect(function()
    game.Workspace.Arm.Begin.Value = true
end)
0
What is the script in? turtle2004 167 — 6y
0
i think its something else wrong with the script. like you need a "Wait()" or something AnAnonymousDeveloper 77 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

There is something else wrong here. What you are doing should work fine assuming the following:

  1. The script is not a local script (If it is it will only change the value client side.)
  2. The value you are trying to change actually exists, double check that it is named Begin and is in the part/model Arm which is inside the workspace.

Lastly if both of those are true try adding a wait as the problem may be that Arm.Began does not exist yet so you are trying to change a non existent value.

Ad
Log in to vote
0
Answered by 5 years ago
  1. Roblox can't change bool values through scripts.
  2. It has to be a script. Example Code: while true do script.Parent.Test.Disabled = true wait(5) script.Parent.Testt.Disabled = false end

Answer this question