-
What do you want to achieve? Keep it simple and clear!
I would like to make a union or model rotate towards the players mouse. -
What is the issue? Include screenshots / videos if possible!
Well, it doesn’t really rotate towards the mouse. When I move the mouse, it sort of spins around and kind of rotates towards it. It keeps shaking aswell. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried changing the axis on the mouse. Didn’t change much.
Heres my script:
local RS = game:GetService("RunService")
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local character = player.Character or player.CharacterAdded:Wait()
while wait() do
local x, y, z = Mouse.hit:ToEulerAnglesXYZ()
local TurretModel = character:WaitForChild("UpperTorso")
print(Mouse.Hit.y)
TurretModel.CFrame = CFrame.Angles(0, math.rad(Mouse.Hit.y), 0)
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.