Touch Event Triggering too many times

I want to make If a player touches a part, the IntValue increase 1. But when I test it, The touch event ran many times and make my Value increases more than 1. This is the script.

	script.Parent.Value.Value += 1
	hit.Parent.PrimaryPart.CFrame = script.Parent.spawn.CFrame
	table.insert(people, hit.Parent.Name)

Please help me.

Wrong category please move to #help-and-feedback

Also I think you need a debounce for that.

Ok, sorry im new to roblox devforum.

1 Like

Check this out: Debounce Patterns | Roblox Creator Documentation
And also check this out: Fading Trap | Roblox Creator Documentation

1 Like

Ok thanks for the solution, it works! later i will post topics on the right category. im new to roblox devForum.