Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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.

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

4 comments

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

0

no errors?

0

Nah I don't have a single error in my output which is what confuses me the most

0

Try changing the Orientation of the PrimaryPart using Vector3

This discussion is preserved as it was. New answers, comments, and votes are closed.