I have a model here that I want to rotate and face wherever the player is facing. It's all good and all except that the model doesn't rotate completely how I want it. It faces the player but it rotates every coordinate. Here's the code
local model = script.Parent
local player = game.Players:WaitForChild("FakeName").CharacterAdded:Wait()
while wait(0.5) do
model:SetPrimaryPartCFrame(CFrame.new(model.PrimaryPart.Position, player.HumanoidRootPart.Position) * CFrame.Angles(0, 0, math.rad(90)))
end
I have it so it faces the player and I want the primary part to go back to it's original basic rotation but whenever I multiply the angles and set it's Z coordinate to 90 and it's X coordinate to 0, it becomes a random number like (9.76, -176.83, 90) instead of keeping the X, Y, Z to 0 and 90.

1 comment
Finally, thanks! I was looking for exactly this. Earlier I had the idea of GetComponents() but wasn't sure completely on how to use it well enough but you helped out greatly