I’ve found a problem on this script, basically i create this dummy with player’s avatar and i’ve tried to animate it, and the result is it just doesnt move at all and the dummy is not anchored i dont understand why it doesnt animate if anyone can modify the script so that the dummy animates too i’d be really grateful
local players = game:GetService("Players")
local player = players.LocalPlayer
local dummy = players:CreateHumanoidModelFromUserId(player.UserId)
dummy.Parent = game.Workspace
local position = Vector3.new(-60.147, 7.236, -84.313)
local orientation = CFrame.Angles(0, math.rad(70), 0)
dummy:SetPrimaryPartCFrame(CFrame.new(position) * orientation)
I just noticed inside the dummy there are the animate scripts of the player idk if i should keep it or delete it through the script
I’ll show you what i tried and how the dummy looks on the explorer cause i tried to animate it but it just doesnt move at all here’s the script i used
local players = game:GetService("Players")
local player = players.LocalPlayer
local animationId = "rbxassetid://133832600063763"
local function playAnimation(dummy)
local humanoid = dummy:FindFirstChild("Humanoid")
if humanoid then
local animation = Instance.new("Animation")
animation.AnimationId = animationId
local animTrack = humanoid:LoadAnimation(animation)
animTrack.Looped = true
animTrack:Play()
end
end
local dummy = players:CreateHumanoidModelFromUserId(player.UserId)
dummy.Parent = game.Workspace
local position = Vector3.new(-60.147, 7.236, -84.313)
local orientation = CFrame.Angles(0, math.rad(70), 0)
dummy:SetPrimaryPartCFrame(CFrame.new(position) * orientation)
playAnimation(dummy)
ok well I find it easiest and it probably works more often maybe (dont quote me) if the animation that you are going to load is already in the game (meaning you dont have to do the instance.new)
Also dont use :LoadAnimation() on the humanoid, use it on its animator