Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a script change a bool value?

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)

3 comments

0

What is the script in?

0

i think its something else wrong with the script. like you need a "Wait()" or something

2 answers

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.

  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

This discussion is preserved as it was. New answers, comments, and votes are closed.