I’m trying to change the default animations.
The first time when I do it it’s fine, but if I try to do it one more time it won’t replicate across the server. Look:
On client side it works perfectly
Btw the running with katana animation does replicate across the server.
Here is the script that changes the animations:
local equippedF = game.ReplicatedStorage.katanaEvents.katanaEquippedPlr
local unequippedF = game.ReplicatedStorage.katanaEvents.katanaUnequippedPlr
local blocking = false
equippedF.OnServerEvent:Connect(function(plr)
if not plr.Character:FindFirstChild("CurrentMove") then
local Label = Instance.new("Folder")
Label.Name = "CurrentMove"
Label.Parent = plr.Character
end
local SS = game:GetService("ServerStorage")
local anims = SS.KatanaDiversity:FindFirstChild("KatanaAnim")
local name = plr.Name
local char = game.Workspace:FindFirstChild(name)
local Animations = char:FindFirstChild("Animate")
local unseathe = Instance.new("Animation")
unseathe.AnimationId = "rbxassetid://5248617291"
local playunseathe = char:FindFirstChild("Humanoid"):LoadAnimation(unseathe)
playunseathe:Play()
Animations:Destroy()
local newanim = anims:Clone()
newanim.Parent = char
newanim.Name = "Animate"
end)
unequippedF.OnServerEvent:Connect(function(plr)
wait(0.1)
local SS = game:GetService("ServerStorage")
local oranim = SS.KatanaDiversity:FindFirstChild("Animate")
local name = plr.Name
local char = game.Workspace:FindFirstChild(name)
local Animations = char.Animate
Animations:Destroy()
local newanim = oranim:Clone()
newanim.Parent = char
newanim.Name = "Animate"
end)
The animations scripts are basically the default animation script but only changed the animation ids.
Please help,
Tem