How do I prevent this script from running multiple times (effects it has)
It makes tons of BodyVelocity in the same part, I also need to destroy the body velocity after x amount of second but dont know exactly how, can anyone fix it making tons of Bodyvelocity in the same part? Thanks.
I also tried to use debounce but that just slowed down the rate which makes more BodyVelocity in the same part.
script.Parent.Touched:Connect(function(touched)
if touched.Name == "EF2" or touched.Name == "EF1" then
local force = Instance.new("BodyPosition",touched)
local noforce = script.Parent.Parent.destroy
local noforceclone = force:Clone().Parent == force
force.MaxForce = Vector3.new(4000,4000,4000)
force.Parent = touched
force.Position = script.Parent.Parent.debripos.Position
end
end)

6 comments
run a debounce until the part has left the part
also isnt this abt the bouncy thing?
are you not able to read? i literally just said i tried to use a debounce and it doesnt work.
Try maybe adding a FindFirstChild or WaitForChild to check if there is a BV, and if there is, set a debounce that prevents it to add anymore BV. If there isnt BV set the debounce to false so it can add BV.
@LoganboyInCO i am able to read relatively fluently, like a normal human. But I would appreciate if u could read the last few words of what i said(like a normal human) and take it into consideration instead of seeing a "debounce" in my sentence and straight up criticizing it(aka ask me wydm by "part has left the part")
also what do u intedn to do with this?