How to Stop the loop of this animation?

I have an issue, that when I start playing my animation it loops, and I couldn’t find any working way on fixing it.

local Sword = script.SwordSwing

wait(1)

local player = game.Players.LocalPlayer
local char = player.Character
local hum = char.Humanoid
local InputServ = game:GetService("UserInputService")

local SwordTrack = hum:LoadAnimation(Sword)

InputServ.InputBegan:Connect(function(input,gameProccesedEvent)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		SwordTrack:Play()
	end
end)

Either do:
SwordTrack.Looped = false
or
Change the Looped property to false in the animation editor by unchecking the looped button

1 Like