Hello, I would like to make a script test if a bool value is true or false. if is false then end and repeat but if it is true it would activate the c-frame.
Here is what I wrote.
if game.Workspace.Arm.Begin.Value == false
then
end
if game.Workspace.Arm.Begin.Value == true then do
distance = 5
for i = 0, distance do
script.Parent.CFrame = script.Parent.CFrame-Vector3.new(1,0.0,0)
wait(00.010)
end
for i = 0, distance do
script.Parent.CFrame = script.Parent.CFrame+Vector3.new(1,0.0,0)
wait(00.010)
end

1 comment
Get rid of the
do. :P (Line 6)