Touch Connection not disconnecting?

Hello, I’m currently trying to make a truck system but the connection is not disconnecting and even without firing the event the player starts to get trucked.

		for _, CharacterLimb in pairs(Character:GetChildren()) do
			if CharacterLimb:IsA("MeshPart") or CharacterLimb:IsA("Part") then
			RagdollConnection =	CharacterLimb.Touched:Connect(function(Hit)
					if Hit.Parent ~= Character then
						if Hit.Parent:FindFirstChild("Humanoid") then
							task.spawn(function()
								RagdollToggleModule:Ragdoll(Hit.Parent)
								
								local RagdollTrigger = Hit.Parent:FindFirstChild("RagdollTrigger")
								RagdollTrigger.Value = true
								
								wait(2)
								RagdollToggleModule:Unragdoll(Hit.Parent)
								
								RagdollTrigger.Value = false
							end)
							
						end
					end
				end)
			end
		end
		
		RagdollConnection:Disconnect()

any help appreciated!

Neveermind I figured out I can just use :Once instead of :Connect

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