print("Hello World") local player = game.Players.LocalPlayer print(player.Name)
When I try to run that code, nothing is being displayed in the output from this local script. There is nothing interfering with the local script (Local script enabled) and the local script is in Workspace.
Is there any reason behind this?
LocalScript cannot run if its in workspace
From the roblox wiki:
A LocalScript will only run Lua 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 Player/Character|character model
A Player’s PlayerGui
A Player’s PlayerScripts
The ReplicatedFirst service