I’m trying to make a first person shooter but for some reason the animations won’t play unless i load it a few times. I don’t have a clue on how to fix this.
local hands = game.ReplicatedStorage.Visualiser.Arms:Clone()
local rserv = game:GetService("RunService")
rserv.RenderStepped:Connect(function()
hands.Head.CFrame = workspace.CurrentCamera.CFrame
hands.Parent = workspace
end)
local idle = hands.Humanoid.Animator:LoadAnimation(script.Idle)
idle:Play()
hands is a humanoid character with invisible body parts. i use collision groups to make it not collide w the character and the head is anchored
Not entirely sure where this script it and when it runs but something you can try doing is waiting a bit, more specifically waiting for the character/player to fully load, and its important to run :Play() again if the character dies.
Besides that I’d recommend welding the hands to the character it’ll be a lot more optimized then constantly updating its CFrame in a loop.