Remoteevent firing multiple times

Here are my scripts:


if you look at the second screen shot then part where it syas OnServerEvent it will fire that mulitple times instead of just once(from the first screenshot)

1 Like

Try moving the RemoteEvent function in your second image out of the MouseClick function.

that works thank you so much!!

No problem! I think what happened was that every time the Click Detector was activated, your script still went through the OnServerEvent function, so its output just built up over time.

that does not work actually because i have multiple crates and everytime it fires all of the crates health go down so i need it in the script.Parent.MouseClick

Try the solution from earlier, but this time change

if typeofsendserver == “Damage”  then

into

if typeofsendserver == “Damage” and script.Parent.Parent.Parent.Health.Value > 0 then

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