Hi, I am new to the DevForum (I just got accepted a few hours ago ) and I ran into this issue while using Roblox Studio a few weeks ago (it’s from that day I’m trying to get in the DevForum ), so here are the details:
What do you want to achieve?
I want to achieve that the player walks around, but with another animation.
What is the issue?
The issue is that when I walk on parts, he would stand while moving, and sometimes float after jumping playing the falling animation,I tried looking at the output and it says:
ServerScriptService.ChangeWalkAnimation:12: Expected ‘)’ (to close ‘(’ at line 11), got ‘player’
when I enter the game, but still prints “Animation works fine”, and it says
Invalid animation id ‘<error: unknown AssetId protocol>’:
periodically, and when I move it says this periodically:
Workspace.Player1.Animate:410: attempt to index nil with ‘Looped’
but still plays the animation, and when I jump and there’s the glitch of playing the fall animation it doesn’t output any error, please help me, I don’t know what to do .
What solutions have you tried so far?
Because I didn’t know what to do I tried looking at the script but there are no errors and I don’t know what else to do, please help me.
This is my script: (It’s in ServerScriptService)
local Players = game:GetService("Players")
local runAnimation = "11999763623"
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
local animateScript = character:WaitForChild("Animate")
animateScript.run.RunAnim.AnimationId = runAnimation
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)
print("Animation works fine")
So I hope some of you can help me with this, and thanks in advance
(Note: I didn’t know if this is the right category but I thought because it was for a script this was the right one)
(Note 2: This is my first post, so please don’t mind any spelling errors, and if you have any tips for becoming better at making posts please tell me)
Sorry, but I was not able to add any videos, it would upload up to 2-3% and then say: “Sorry, there was an error uploading that file. Please try again.”
local runAnimation = 11999763623
local Player_Service = game:GetService("Players")
local player = Player_Service.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local AnimateScript = character:WaitForChild("Animate")
AnimateScript:WaitForChild("run"):WaitForChild("RunAnim").AnimationId = "rbxassetid://"..tostring(runAnimation)
Run the game in studio, if you see a model with your name. Click the left thing or whtever, if you found a local script with named “Animate”, copy it. After that stop the game and go to starterplayer and go to startercharacterscript then paste the script that you copied
Ok, I tried using this and I found a lot of animations already there (ex. climb, walk, run, jump etc.), and from there I can change the animation ID directly from there, so this is an alternative solution. (But because it was not the solution for the script I will not mark it)