I was making an intro for a game. But I discovered a bug in my script that I’ve never seen before. My animation isn’t playing. It just gives me the prints instantly.
13:10:34.127 begun - Client - LocalScript:13
13:10:34.127 played - Client - LocalScript:15
13:10:34.132 ended - Client - LocalScript:19
13:10:38.438 Disconnect from ::ffff:127.0.0.1|57368 - Studio
I’ve entered the right ID for the animation. I didn’t know what was going on. So that’s why I posted this topic. Here is my script.
local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character.Humanoid
local Animator = humanoid.Animator
local function firsttimeplayingintro(lplayer)
local spawnanim = Instance.new("Animation")
spawnanim.AnimationId = "rbxassetid://110683084091515"
local spawnanimtrack = Animator:LoadAnimation(spawnanim)
spawnanimtrack.Priority = Enum.AnimationPriority.Action
spawnanimtrack.Looped = false
print("begun")
spawnanimtrack:Play()
print("played")
lplayer.Character:WaitForChild("Humanoid").WalkSpeed = 0
spawnanimtrack.Stopped:Wait()
lplayer.Character:WaitForChild("Humanoid").WalkSpeed = 16
print("ended")
end
firsttimeplayingintro(player)