Skip to main content
Discovery icon for Retro Dev Discord server

Retro Dev

7,601 Online
44,248 Members
# retro-chat3 people

scripting leaderstats on part touch

Update leaderstats upon touching a part by finding the character's humanoid, verifying the player, and matching stat names.

  • Detect contact using the part's touched event, check for a humanoid in the hit object's parent, and then locate the player
  • Add a debounce check to prevent the touch event from spamming increments repeatedly
  • Ensure the leaderstat name targeted in the touch block script exactly matches the stat defined in the leaderstats script
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App