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

Scripting a hinge's angular velocity?

I'm trying to make a ferris wheel that can stop and go by a button but it said that "attempt to call a number value", did I type something wrong, please help me. thank you

local stop = script.Parent
local change = script.Parent.Parent.Model.Part.HingeConstraint
local click = script.Parent.ClickDetector

function onMouseClick()
change.AngularVelocity = change.AngularVelocity(0) --change the value of angular velocity to 0 but it won't work
end

click.MouseClick:connect(onMouseClick)

2 comments

1

i don't know. figure it out yourself

0

@csafdwR33r33 knows what he's talking about br0

1 answer

✓ Accepted answer

no no no you are calling a function like that

change.AngularVelocity(0)

Brackets is how you call a function in Roblox:

:FindService() -- brackets
:Destroy() -- brackets
print() -- brackets
rawset() -- brackets

Those are functions but what you want to do is change the value, since the acceptable value of Angular Velocity is Int Value then you need to do this:

change.AngularVelocity = 0

Well this is it.

1 comment

0

thx it works now :)

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