A client script
The first script runs on each player's computer. Its ShotScript is the Luau you already write.
You'll learn where a client script goes, how its side is set, and what ShotScript Editor writes.
The script
In StarterPlayer, StarterPlayerScripts, insert a LocalScript named Client, mark it as ShotScript, and write:
local Players = game:GetService("Players") print("client started for", Players.LocalPlayer.Name)
- Its side is the client: a LocalScript runs on each player's computer. A Script with RunContext Client is client code too. No first line names the side.
- ShotScript Editor checks the script as you type. A mistake is marked at its line.
- The editor writes Luau into the Source by itself, with your text kept in a
--[=[ SHOT ... ]=]comment block at its end. Edit the script in its ShotScript tab, not in the Source: the editor refuses Luau that was edited by hand, unless you choose to overwrite it. - Mark as ShotScript turns the script into ShotScript. A LocalScript or a Script gets no system line: the mark writes one only on a ModuleScript (steps 4 and 5).
Try it
Press Play. The Output shows client started for and your name.
