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

How to get the rotation?

Asked by 8 years ago
local currentShelfPos = script.Parent.Parent:GetPrimaryPartCFrame()
        print(currentShelfPos)
        local X = currentShelfPos.X
        local Y = currentShelfPos.Y
        local Z = currentShelfPos.Z
        script.Parent.Parent.Parent.Parent.AvailableCar[btn.Text]:SetPrimaryPartCFrame(CFrame.new(X,Y,Z))

So this bit works so far, it puts the car in the same position as the other car, How would I make it have the same rotation?

Thanks

1 answer

Log in to vote
0
Answered by
Spectrobz 140
8 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.
local currentShelfPos = script.Parent.Parent:GetPrimaryPartCFrame()
script.Parent.Parent.Parent.Parent.AvailableCar[btn.Text]:SetPrimaryPartCFrame(currentShelfPos)
Ad

Answer this question