Im making my version of the body swap potion in roblox, problem comes when animating the characters that are r15 with the animations they must have, basic animate script just makes them have the default animations and not any custom like zombie animation package, robot, stylish, etc.
For whatever reason the output gets flooded with sanitized id errors, this has been a problem that many people get when using animations, ive already looked for solutions but none worked
local function Animate(Char: Model)
local OAnimate = Char:FindFirstChild("Animate")
if OAnimate then
OAnimate:Destroy()
end
local Player = Players:GetPlayerFromCharacter(Char)
local AnimateS
if Player then
AnimateS = script.Animate:Clone() -- Local Animate Script for Players
AnimateS.Parent = Char
else
AnimateS = script.AnimateS:Clone() -- Server Animate Script for NPCs
AnimateS.Parent = Char
AnimateS.Name = "Animate"
end
local Desc = Players:GetHumanoidDescriptionFromUserId(Char.PlayerId.Value)
AnimateS.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=" .. Desc.IdleAnimation
AnimateS.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. Desc.WalkAnimation
AnimateS.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. Desc.RunAnimation
AnimateS.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=" .. Desc.SwimAnimation
AnimateS.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. Desc.FallAnimation
AnimateS.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. Desc.JumpAnimation
AnimateS.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. Desc.ClimbAnimation
AnimateS.Enabled = true
end