I might be misunderstanding, but is the script supposed to be a purely top-down camera with some extras. Or was it also supposed to rotate the character?
Because I am currently only getting these results:
That’s because the rotating is a different script completely, pretty sure i was using bodygyro and some foot plating script.
The script you quoted only affects the camera and it works in three dimensions.
I’m confident that this isn’t even my code, it was a long time ago before I knew how to do this stuff, and to be honest, it’s really simple.
local Mouse = game.Players.LocalPlayer:GetMouse()
local RunService = game:GetService("RunService")
local Player = game:GetService("Players")
local LPlayer = Player.LocalPlayer
local character = LPlayer.Character
character.Humanoid.AutoRotate = false
local Humanoid = character:WaitForChild("Humanoid")
local HumanoidRoot = character:WaitForChild("HumanoidRootPart")
local Torso = character:WaitForChild("UpperTorso")
local Gyro = Instance.new("BodyGyro")
Gyro.Parent = Torso
Gyro.Name = "MouseFollower"
Gyro.D = 50
Gyro.P = 4000
Gyro.MaxTorque = Vector3.new(0,4000,0)
RunService.Heartbeat:Connect(function()
local hit = Mouse.Hit
local relHit = hit.p - HumanoidRoot.Position
local add = 0
if relHit.X > 0 then
add = math.rad(90)
else
add = math.rad(270)
end
local rotY = math.atan(relHit.Z/relHit.X) + add
Gyro.CFrame = CFrame.new(0,0,0) * CFrame.Angles(0,-rotY,0)
end)
Beware that it is gonna physically rotate the character so you have to prevent it from launching upwards while next to any object it can collide with, my solution was an invisible slippery cylinder inside the playable character, and yes other players can see it.
If you find any further problems you gonna have to resolve them yourself.