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

Script to rotate a model isn't working. Does anyone have any suggestions on how to fix this?

Asked by 4 years ago
Edited 4 years ago

So i'm bringing a model out of server storage and then I'm trying to rotate it with this, however, it's not changing the orientation at all,

    local house = game.ServerStorage.Houses:FindFirstChild(houseType):Clone()
    house.Parent = game.Workspace


            house:SetPrimaryPartCFrame(house:GetPrimaryPartCFrame() * CFrame.Angles(0, math.rad(90), 0))                

Does anyone happen to see anything wrong here or have any suggestions?

2 answers

Log in to vote
0
Answered by
naturedat 124
4 years ago

Try CFrame.Orientation or CFrame.fromEulerAnglesXYZ or

house:SetPrimaryPartCFrame(house.CFrame * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0))

Or you could try and replace the above with Orientation or Angles. Try different ways.

Ad
Log in to vote
0
Answered by
zadobyte 692 Moderation Voter
4 years ago

You have to set the house's parent to the workspace in order for it to even appear.

0
Sorry I should have included this in the post but I actually do have it set as the workspace and it appears just fine. The issue is that it still won't change its rotation pickles980 4 — 4y
0
no errors? zadobyte 692 — 4y
0
Nah I don't have a single error in my output which is what confuses me the most pickles980 4 — 4y
0
Try changing the Orientation of the PrimaryPart using Vector3 SirGamezy 186 — 4y

Answer this question