The character in my viewframe doesn’t face the mouse properly when the mouse is within the frame. I’m not sure why or how I can fix this, any ideas? I’ve tried changing some variables but that screws everything up when I do. (math.rad(mouseX/3.65))
runService.Heartbeat:Connect(function(dt)
if hover then
local mouseX = mouse.X
local spin = tweenService:Create(script.Parent.WorldModel.Rig.PrimaryPart, rotationInfo, {CFrame = CFrame.new(0, 3.192, 0)*CFrame.Angles(0, math.rad(mouseX/3.65), 0)})
spin:Play()
end
end)
frame.MouseEnter:Connect(function()
hover = true
end)
frame.MouseLeave:Connect(function()
hover = false
end)
What it looks like:
What it should look line (testing in studio):