ServerEvent firing three times instead of one

My script fires 3 times instead of a single time, I’ve tried debouncing and it still fires multiple times, and I’m not sure what causes this. Can anyone help?

dashevent.OnServerEvent:Connect(function(sender)
	if pressedonce == false then
		pressedonce = true
	local char = sender.Character
	local stamina = sender.Backpack.Stamina
	if stamina.Value > 0 then
		stamina.Value -= 1
		print(stamina.Value)
	local playAnim = char.Humanoid:LoadAnimation(dashanimation)
		playAnim:Play()
		print(sender,"dash")
		local Attachment1 = Instance.new("Attachment", char.HumanoidRootPart)
		Attachment1.Name = "Attachment1"
		Attachment1.Position = Vector3.new(0, 1.4, 0)
		local Attachment = Instance.new("Attachment", char.HumanoidRootPart)
		Attachment.Position = Vector3.new(0, -1.6, 0)
		local TrailCloned = CloneTrail:Clone()
		TrailCloned.Parent = char.HumanoidRootPart
		TrailCloned.Attachment1 = Attachment1
		TrailCloned.Attachment0 = Attachment
		local SmokeClone = Smoke:Clone()
		SmokeClone.Parent = char.HumanoidRootPart
		local DashClone = DashNoise:Clone()
		DashClone.Parent = char.HumanoidRootPart
		DashClone:Play()
		local SpindashClone = Spindash:Clone()
		SpindashClone.Parent = char.HumanoidRootPart
	SpindashClone:Play()
	local Tween0 = TweenService:Create(char.Head.face, TweenStyle, {Transparency = 1})
	Tween0:Play()
		for i, v in pairs(char:GetChildren()) do
			if v:IsA("BasePart") and v ~= char:FindFirstChild("Humanoid").RootPart then 
				local Tween1 = TweenService:Create(v, TweenStyle, {Transparency = 1})
				Tween1:Play()
			elseif v:IsA("Accessory") then
				local Tween2 = TweenService:Create(v:WaitForChild("Handle"), TweenStyle, {Transparency = 1})
				Tween2:Play()
			end
		end
	SmokeClone.Enabled = false
	TrailCloned.Enabled = false
	

		char.Humanoid.JumpPower = 50
		for i, v in pairs(char:GetChildren()) do
			if v:IsA("BasePart") and v ~= char:FindFirstChild("Humanoid").RootPart then
				local Tween3 = TweenService:Create(v, TweenStyle, {Transparency = 0})
				Tween3:Play()
			elseif v:IsA("Accessory") then
				local Tween4 = TweenService:Create(v:WaitForChild("Handle"), TweenStyle, {Transparency = 0})
				Tween4:Play()
			end
	end
	local Tween10 = TweenService:Create(char.Head.face, TweenStyle, {Transparency = 0})
	local playAnim1 = char.Humanoid:LoadAnimation(rollout)
	playAnim:Play()
	Tween10:Play()
	playAnim:Stop()
		wait(1)
		SpindashClone:Destroy()
		DashClone:Destroy()
		TrailCloned:Destroy()
		Attachment:Destroy()
		Attachment1:Destroy()
			SmokeClone:Destroy()
			pressedonce = false
	else
			print("No stamina?")
		end
end
end)

Client script:

UIS.InputBegan:Connect(function(input, gameProcessed)
	if input.KeyCode == keybind and not gameProcessed then
		local dodge = Instance.new("BodyVelocity")
		char.Humanoid.JumpPower = 70
		dodge.MaxForce = Vector3.new(5,0,5) * 30000
		dodge.Velocity = char.HumanoidRootPart.CFrame.lookVector * 100
		dodge.Parent = char.HumanoidRootPart
		local Stamina = sender.Backpack.Stamina
		dashevent:FireServer()
		print("fireserver fired")
		if Stamina.Value > 0 then
			print("has stamina")
			local Tween5 = TweenService:Create(CameraFOV, TweenStyle, {FieldOfView = 80})
			Tween5:Play()
			wait(0.5)
			local Tween6 = TweenService:Create(CameraFOV, TweenStyle, {FieldOfView = 70})
			Tween6:Play()
		else
			disabled:Play()
			print("disabled")
		end
		for count = 1, 4 do
			wait(0.1)
			dodge.Velocity*= 0.7
			print("FOR COUNT")
		end
		dodge:Destroy()
		if Stamina.Value == 0 then 
			print("client side no stamina L")
			game.ReplicatedStorage.nostamina:FireServer()

		end
		
	end
end
)

Does the script that fires the event have a debounce?

yes, i’ve tried putting a debounce on the serverscript, but i dont think the client needs one as i printed out a decode text and it doesnt seem to be repeating, the server seems to be repeating though

Trying putting a debounce on the localscript instead, see what happens.

forgot to say, i recoded the thing and managed to fix it.