I made a 2D script where it makes the Player Camera Follow him in 2D like in Super mario and other games but it suspends the running animation can someone help me with this?
local Camera = game.Workspace.CurrentCamera
local Player = game.Players.LocalPlayer
repeat
wait()
until Player.Character
local Character = Player.Character
local Player_Torso = Character.HumanoidRootPart
local BodyPositioner = Instance.new("BodyPosition", Player_Torso)
BodyPositioner.MaxForce = Vector3.new(0, 0, math.huge)
BodyPositioner.Position = Vector3.new(0, 0,Player_Torso.Position.Z)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = Player_Torso
game:GetService("RunService").RenderStepped:connect(function()
Camera.CFrame = CFrame.new(Player_Torso.CFrame.X, Player_Torso.CFrame.Y, Player_Torso.CFrame.Z + 30)
Camera.FieldOfView = 80
end)
now i explain things REALLy confusingly and sorry if it is really confusing EDIT: when you die it the camera doesnt shift to the player Position
