RemoteEvent is firing multiple times, forcing a value to go back to the value it was when it first fired?

I’m creating a global server-wide player boss health bar for a little hub I use to create whatever wacky ideas I have. The healthbar is mostly working fine for all the clients, hiding and showing when a certain player who’s allowed to have it joins or leaves, etc… but for some reason…

Whenever the player with the boss bar gets damaged, the other clients do correctly change their GUI’s sizes, but my RemoteEvent is for some reason firing multiple times on other people’s clients, giving the same value “healthPercent” (the third variable) had when the RemoteEvent first fired…?


The event inside the healthbar’s ServerScript variant

The event being acknowledged (hopefully) properly in the healthbar’s LocalScript variant (updateHealthBar is commented because I thought that was the issue… somehow.)
image
The client trying to set the “healthPercent” value to what the server currently has it, but failing

I couldn’t really do much to fix this given my scripting skills is not really that great, so if the answer is quite obvious, please feel free to call me out for it. Any help is greatly appreciated.

Can you show the line of the script that changes the HealthPercent?

Oh shoot, my bad.


It’s sorta the same as the client. It may be inefficient but it works for me.

I think it would be better if you add a NumberValue to the Character which will be the HealthPercent, and have the client use that instead. Which SHOULD fix it.

1 Like

I see, I’ll try that later. Thanks for the suggestion!

1 Like

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