Anyone else experiencing Animation trouble in StarterCharacterScripts?

So, everythings in its right place, I’ve debugged it multiple times, even using WaitForChild(), tested if it was playing, it all came back fine but it just doesn’t play the animation… Animations not moderated and is already published under MY game, so what’s exactly happening?? task.spawn() isn’t messing with it either…

local TweenService = game:GetService("TweenService")

local player = game.Players.LocalPlayer
local char = script.Parent
local humanoid = char.Humanoid
local animFolder = game.ReplicatedStorage.Animations
local Animator = humanoid.Animator

-- Spawn I-Frames
task.spawn(function()
	local highlight = Instance.new("Highlight")
	highlight.FillColor = Color3.fromRGB(255, 255, 255)
	highlight.Parent = char
	highlight.DepthMode = Enum.HighlightDepthMode.Occluded
	local SpawnTrack = Animator:LoadAnimation(animFolder.ErenSpawn)
	SpawnTrack.Looped = false
	SpawnTrack:Play()

	player:SetAttribute("IFrames", true)

	task.wait(5)
	
	TweenService:Create(highlight, TweenInfo.new(1), {
		FillTransparency = 1,
		OutlineTransparency = 1
	}):Play()
	
	task.wait(1)
	
	highlight:Destroy()
	player:GetAttribute("IFrames", false)
end)

1 Like