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

Function thats like HealthChanged but for character?

Asked by 4 years ago

Hey, I haven't been able to find anything online about this question. I have a GUI with a script that displays the tool the player has equipped, but the only thing I found that works is a While True Do. I tried. Character.Changed:connect, dont get any errors but nothing activates the function. Not even the player getting damaged. Any functions similar to what Im looking for, CharacterChanged?

0
??????? Elixcore 1337 — 4y

1 answer

Log in to vote
0
Answered by
Velsity 218 Moderation Voter
4 years ago

If I understand your question correctly, you want the script to update whenever a player is equipping a tool.

You should use ChildAdded and ChildRemoved for this. These fire everytime a new child is added to the character.Which you then can hook up with your script. Tools spawn in the character when equipped, so ChildAdded would fire everytime you equip it. Same with ChildRemoving, it will fire everytime you unequip the tool.

0
Best answer there ever was Pinetall 4 — 4y
Ad

Answer this question