So I am making a custom animation script cause I don’t feel like importing the animate script from the character to the actual game. The error is line 5 and I am confused. Cause it shows no red lines in the script or any of that.
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player:WaitForChild("Character")
local Anims = Character.Animate
--// Idle Animations
Anims.idle.Animation1.AnimationId = "rbxassetid://6671126042"
Anims.idle.Animation2.AnimationId = "rbxassetid://6671126042"
--// Walk/Sprint Animations
Anims.walk.WalkAnim.AnimationId = "rbxassetid://6673341968"
Anims.run.RunAnim.AnimationId = "rbxassetid://6691281060"
I’d say it’d be easier to insert the actual Animate script and modify it from there. But I am so confused why it is giving an error. Line 5 seems to be a comment?
--locals
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait() -- < < < it not Player:WaitForChild("Character")
local Anims = Character:WaitForChild("Animate")
--Idle animation
Anims.idle.Animation1.AnimationId = "rbxassetid://6671126042"
Anims.idle.Animation2.AnimationId = "rbxassetid://6671126042"
--Walk and Run animation
Anims.walk.WalkAnim.AnimationId = "rbxassetid://6673341968"
Anims.run.RunAnim.AnimationId = "rbxassetid://6691281060"