Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Touched event looping,being triggered more than once?

Asked by 7 years ago

This has been bothering me since i started scripting. Basically,when i used the .Touched event like this for example

local Brick = script.Parent

Brick.Touched:connect(function()
    print("You just touched this part")
end)

And when i touch the part,instead of printing "You just touched this part" once It prints it tons of times,and it just spams the output sometimes. Im trying to make a weapon damage only by 30 damage,instead it basiclly "Loops" the damage,doing like 900 or so because of that

Is there a solution for this?

0
Thanks alot kristibezatlliu1111 33 — 7y
0
That fires every frame that the part is touced which is why it "loops" the damage. GoldenPhysics 474 — 7y
0
Okay kristibezatlliu1111 33 — 7y

Answer this question