What do you want to achieve?
I want to run the script
What is the issue?
I want to fix the problem, there is an error in the camera or in the player or in the animation
What solutions have you tried so far?
I tried to change the animation and fix some bugs in the script but I can’t find the error
this is the script
There are two animations, one from the npc(“United_LxE”) and the other from the user. The camera is in scriptable and it’s in the character’s cframe, but the head spins when I put it, that’s the only problem.
I don’t know much about scripts, you can do some scripts too many or others with errors
local RunService = game:GetService("RunService")
local Character = script.Parent
local Animation = game.Workspace.United_LxE.Script:WaitForChild("Dances")
local Anim = game.Workspace.proxxxi:WaitForChild("Animation")
local player = game.Players.LocalPlayer
local Head = player.Character.Head
local CamPart = workspace.Model1.Cameraaa
local Camera = workspace.Camera
wait(3)
local Run = nil
local function Cinematica(Bool)
if Bool == true then
Camera.CameraType = Enum.CameraType.Scriptable
Run = RunService.Stepped:Connect(function()
local hum = player.Character:WaitForChild("Humanoid")
local loadAnim = hum.Animator:LoadAnimation(Anim)
loadAnim:Play()
Camera.CFrame = Head.CFrame
end)
else
Run:Disconnect()
Camera.CameraSubject = Character.Humanoid
Camera.CameraType = Enum.CameraType.Scriptable
end
end
Cinematica(true)
Animation.Stopped:Connect(function()
Cinematica(false)
end)