Help with a Textlabel displaying HingeConstraint AngularVelocity

Alright so, I have been lately trying to script SurfaceGui TextLabel to show the AngularVelocity of the HingeConstraint.

I have tried finding solutions on the Forums, unfortunately I haven’t found any working solutions, as so I’m asking you here.

Feel free to ask for any further details etc.

local Model = script.Parent.Parent.Parent.Parent.EngineR.EngineR.EngineMain.SpeedControl.HingeConstraint.AngularVelocity

while true do

script.Parent.Text = tostring(Model)

end

Edit 1:
image

Try this :

while true do task.wait()
    script.Parent.Text = tostring(Model)
end

The wait() is really important here or it will go too fast disabling screen rendering.

You’re only referencing the AngularVelocity before the loop.

local Model = script.Parent.Parent.Parent.Parent.EngineR.EngineR.EngineMain.SpeedControl.HingeConstraint

while true do

script.Parent.Text = tostring(Model.AngularVelocity)

end

Alright this worked nicely, thank you for help.

I just had to add in “while true do” the “wait()”

Oh yeah!
Actually use
while task.wait() do
instead to clean up the code.

wait() got replaced by task.wait()

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.