player = game.Players.LocalPlayer
mouse = player:GetMouse()
x=1
y=1
z=1
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.R then
print'r' -- just here cause
player.Character.short:FindFirstChild("Model"):SetPrimaryPartCFrame(
CFrame.new(x,y,z),CFrame.Angles(0,math.pi,0))
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
where short is the name of a message.
sadly, the above script does not work. It's supposed to rotate the model whenever i press r. But what happens is that the model moves a little bit lower, presumably to the y position of pi. So how do i have the model be rotated?

2 comments
Are you Using CFrame or Position to rotate the model?
edited