Animation keeps on looping

Basically, I want an animation to play when a player hits a keybind. However the animation keeps playing in a loop instead of playing once.

local rp = game:GetService("ReplicatedStorage")
local re = rp.Animation.Set
local player = game.Players.LocalPlayer
local char = player.Character
local humanoid = char:WaitForChild("Humanoid")

local connection

local function anim()

	local Set = Instance.new('Animation')
	Set.AnimationId = 'rbxassetid://8083568248' 
	local SetTrack = humanoid:LoadAnimation(Set)

	SetTrack:Play()
	SetTrack.Stopped:Wait()
	connection:Disconnect()

end

connection = re.OnClientEvent:Connect(anim)

You may have probably set the loop to true when editing the animation.