Been trying to do this for a while now, however can't seem to get it to work. Every time I run a test, it just prints out an error and doesn't work. According to the error, the script which is suppossed to replace the default "Animate" on your character cannot find the new one which I named "Custom". If it's unable to find "Custom", then it just won't work, however I got no idea on how to fix this as I'm still just a beginner learning how to do stuff. Any ideas? (After clicking on the error it just highlights all of the "NewAnimScript", therefore I assume it didn't assign "Custom" to it)
local Player = game.Players.LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait(); -- Wait for the character to spawn
local Humanoid = Character:WaitForChild("Humanoid");
Character:WaitForChild("Animate"):Destroy(); -- Destroy the default animations
local Tracks = Humanoid:GetPlayingAnimationTracks(); -- Get all playing animations from our character
for i, thistrack in pairs(Tracks) do -- Stop and destroy all animations that are playing
thistrack:Stop();
thistrack:Destroy();
end
local NewAnimScript = ("Custom") -- Reference and parent the new script
NewAnimScript.Parent = Character;
NewAnimScript.Disabled = false;
Workspace.WurksBrother99.LocalScript:15: attempt to index string with 'Parent'
- The error it prints out
