i want the clone to play the animation but it isnt working >:((
script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage.RemoteEvent
local function cloner(plr)
local Chr = plr.Character or plr.CharacterAdded:Wait()
Chr.Archivable = true
local clone = Chr:Clone()
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://8840756422"
local track2 = clone:WaitForChild("Humanoid"):LoadAnimation(animation)
clone.HumanoidRootPart.CFrame = Chr.HumanoidRootPart.CFrame * CFrame.new(3.5, 0, -1.2) * CFrame.Angles(0, math.rad(90), 0)
wait(0.1)
track2:Play()
clone.Parent = workspace
end
remoteEvent.OnServerEvent:Connect(function(plr)
cloner(plr)
end)
Error Code: Cannot load the AnimationClipProvider Service.
Winbloo
(Winbloo)
#2
you have to parent the character to workspace beforehand, then load the animation after
1 Like
Winbloo
(Winbloo)
#4
local remoteEvent = ReplicatedStorage.RemoteEvent
local function cloner(plr)
local Chr = plr.Character or plr.CharacterAdded:Wait()
Chr.Archivable = true
local clone = Chr:Clone()
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://8840756422"
clone.Parent = workspace -- kage bunshin no jutsu!
local track2 = clone:WaitForChild("Humanoid"):LoadAnimation(animation)
clone.HumanoidRootPart.CFrame = Chr.HumanoidRootPart.CFrame * CFrame.new(3.5, 0, -1.2) * CFrame.Angles(0, math.rad(90), 0)
wait(0.1)
track2:Play()
end
remoteEvent.OnServerEvent:Connect(function(plr)
cloner(plr)
end)
i mean like this also the script is disabled
1 Like