New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

Why does it suspend the running animation?

Asked by 6 months ago
Edited 6 months ago

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
until Player.Character
local Character = Player.Character
local Player_Torso = Character.HumanoidRootPart
local BodyPositioner ="BodyPosition", Player_Torso)
BodyPositioner.MaxForce =, 0, math.huge)
BodyPositioner.Position =, 0,Player_Torso.Position.Z)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = Player_Torso
 Camera.CFrame =, Player_Torso.CFrame.Y, Player_Torso.CFrame.Z + 30)
 Camera.FieldOfView = 80

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

1 answer

Log in to vote
Answered by 6 months ago

Alright, i'm going to constantly do edits to this but try adding an if statement for when the character dies. Something in this sense. If player respawns, find local player. Something along those lines. I don't know A LOT about the Character section nor the camera functions so i'm just going through what I can.


Answer this question