Ello fellow devforum users, I have just started working with sounds in scripts and in general, and I have absolutely 0 clue on why this sound wont load? or in general, no sounds are loading. I checked the roblox api references but didnt find anything… Can someone help?
Script:
local tool = script.Parent
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://7873962022"
local track
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://664046210"
tool.Activated:Connect(function()
if sound.IsLoaded then
track = script.Parent.Parent.Humanoid:LoadAnimation(Anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = false
sound:Play()
track:Play()
wait(0.5)
track:Stop()
sound:Stop()
else do
return
end
end
end)
thanks in advance