Script randomly breaks when attempting to close a "then" statement in sword

This was working perfectly fine earlier, I have no idea what could of broke it. Anyone have ideas on how to fix this?

Edit: ParrySound is a RemoteFunction


-- Remote event commands
local Parry = tool:WaitForChild("ParrySound")

local ParryValue = tool:WaitForChild("Parry")

Parry.OnServerEvent:Connect(function()
	local ParrySoundfile = blade:FindFirstChild("Parry")
	
	if not ParrySoundfile then
		return
	end

	ParryValue.Value = true

	ParrySoundfile:Play()
	CanSwing.Value = false
		
	wait(1)

	CanSwing.Value = true

	ParryValue.Value = false
end)

You forgot to put an end somewhere above the snippet. The snippet itself is fine.
Should be the function at line 60.

Thanks, I misplaced a line of code which had an β€œend” in it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.