Scripts Won't Run

This is either an intended feature or a bug, or maybe its just my mistake.


The problem is that scripts, both local scripts and server script, do not run inside leaderstat values. The script is written as so:

print("Hello world")

Parenting:

game > Players > LocalPlayer > Leaderstat > IntValue > Server Script or Local Script

Absolutely no errors, and does not print anything


All help is appreciated

A server script will only run code if it is a descendant of the Workspace or
ServerScriptService, and a local script will only run code if it is a descendant of one of the following objects:

  • a player’s Backpack , such as a child of a Tool
  • a player’s character model
  • a player’s PlayerGui
  • a player’s PlayerScripts
  • the ReplicatedFirst service.

The leaderstats folder is inside of your player object which is in none of these locations no matter what type of script you are using. I suggest you handle all of your leaderstat values from a server script in ServerScriptService.

4 Likes