Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the MainWeld not rotating?

Asked by
Bertox 159
6 years ago
Edited 6 years ago

Hello I'm making a Motorcycle game and I want to make the wheels rotate, but the MainWeld doesn't rotate.

Here is a gif so you can see exactly what I mean: https://gyazo.com/ca048450cf636e2f6b89673de4782267

This is the script part which moves the wheel:

--loop
for i,v in pairs(Motorcycle.Body.fWheel:GetChildren()) do
        v.WheelWeld.C1 = v.WheelWeld.C1 * CFrame.fromEulerAnglesXYZ(0.5,0,0)
    end
    for i,v in pairs(Motorcycle.Body.rWheel:GetChildren()) do
        v.WheelWeld.C1 = v.WheelWeld.C1 * CFrame.fromEulerAnglesXYZ(0.5,0,0)
    end

It gets the children of the WheelModel and rotates the CFrame, but Main doesn't rotate. Main is where the Wheel Children are connected to

Answer this question