Alright, so I have a script that is supposed to print "Touched" once when a player steps on it once, but it keeps duplicatin' the message as fast as hell. Here's my script.
local part = script.Parent part.Touched:Connect(function(onTouchPart) print("Touched") end)
It's a Script parented to a Part in the Workspace.
I'll be waitin' for answers, y'all.
You can fix this by adding debounce, here is a quick fix to prevent this.
local part = script.Parent local debounce = false part.Touched:Connect(function(onTouchPart) if debounce = false then debounce = true print("Touched") wait(3) debounce = false end end)
What we are basically doing here is adding a debounce (small wait duration) to the code to prevent it from spamming.