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

How to change Orientation with a Script?

Asked by
Dalamix 26
4 years ago
script.Parent.Changed:Connect(function()
    if script.Parent.SteerFloat == 1 then
        script.Parent.Parent.FL.Orientation = Vector3.new(0,-45,0)
        script.Parent.Parent.FR.Orientation = Vector3.new(0,-45,0)
    elseif script.Parent.SteerFloat == -1 then
        script.Parent.Parent.FR.Orientation = Vector3.new(0,45,0)
        script.Parent.Parent.FL.Orientation = Vector3.new(0,45,0)
    end
end)

I have a script that is parented to a VehicleSeat, which is parented to a Model with FR and FL being parts. I can't seem to make them rotate, why?

1
Use CFrame instead. It's a better option. Thesquid13 301 — 4y
0
But how would I do it then? Dalamix 26 — 4y
0
@Dalamix no Orientation is better lul Freddan2006YT 88 — 4y
1
CFrame is a more powerful tool, anyone saying orientation is better does not know how CFrame works. All you have to do is use CFrame.angles. Thesquid13 301 — 4y
View all comments (2 more)
0
It doesn't matter. NIMI5Q -2 — 4y

Answer this question