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

Boolnumber speed help?

Help! I have been trying to make it so it will go the speed of the boolvalue, What am I doing wrong

while true do 
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,script.Parent.Speed,0)
--Speed is the boolValue
end 

2 comments

0

A boolean is a true/false value. It sounds like you need an integer.

0

It's a numbeValue

1 answer

There are two things wrong here.

1: A bool (or boolean) is a true/false value. An number (or integer) cannot be stored in a bool value.

2: In order to access the value of a value object, you need to check it's Value property.

Change your BoolValue to an IntValue and use this code instead:

while true do 
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,script.Parent.Speed.Value,0)
end 

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