Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing player's default animation of choice to custom animation ID?

Asked by 5 years ago
Edited 5 years ago

Upon tinkering with the player's character in the workspace, I found a LocalScript that contained Animations. In these contained the player's choice of animation, and I want to change that to a custom animation or a ROBLOX preset, like rThro.

Here's my attempt (LocalScript, Workspace)

local player = game.Players.LocalPlayer
local character = player.Character
local runAnim=character:WaitForChild('Animate'):WaitForChild('run'):WaitForChild('RunAnim')
local walkAnim=character:WaitForChild('Animate'):WaitForChild('walk'):WaitForChild('WalkAnim')

runAnim.AnimationId = 'rbxassetid://2510238627'
walkAnim.AnimationId = 'rbxassetid://2510242378'

However, the run animation works, but the walk animation is partially overriden by the player's choice of animation. (In my case, the cartoony walk.)

Any help?

(P.S, sorry about the format of the code block, I'm new and I don't know what to do about it.)

2 answers

Log in to vote
0
Answered by 5 years ago

If you want your script to replace the default animation script Roblox puts in your character then follow the following: make sure that your script is named "Animate" (or whatever the script animation script is called that is placed in the player's character) and make sure to place the script in StarterCharacterScripts as that puts it into the character.

But if you would like to get the default script and edit it just press "F5", go into Workspace, go into your character, then right-click the "Animate" script and press "Copy". After that, stop the game and paste it into the StarterCharacterScripts. To change the animations go into the script and paste your Roblox assetid into the quotations that associate with the animation that you want to change.

If you have any questions or issues please contact me. ;)

0
y beat me to it hakerethan 10 — 5y
0
XD lazycoolboy500 597 — 5y
0
Yes, I have an issue. It still does it even when I placed the player's Animate script into the StarterCharacterScripts. Sensei_Developer 298 — 5y
0
Make sure that the script is replacing the default script. My best fix is actually to copy and paste the animate script from the player into StarterCharacterScripts. lazycoolboy500 597 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

To change it, first go to test mode on your game. Then pause it and copy your character. Once done press stop and paste the character. Go inside and press Animation. Drag animation to StarterPlayer > StarterCharacterScripts. Once done, open it and find the name of the animation you want to edit. Then change the ID to your id.Go inside of the script and press the animation. Change the ID and wallah, its done. If you want to change animations with Weights applied, I think you could instantly figure that out. If not, reply to my answer and I will tell you.

0
I don't know. What do they even do? Sensei_Developer 298 — 5y
0
Also, it still doesn't work. I'll edit the post to let you know how it looks like. Sensei_Developer 298 — 5y

Answer this question