This script is not working as it is supposed to

Hello out there I am learning how to script and I was testing with a local script and this script is supposed to print the name of the client when it joins. Can someone help me with this?

The script
local player = game.Players.LocalPlayer
print (player)

try this:

local player = game.Players.LocalPlayer
print(player.Name)

Make sure the local script is in the StarterGui

2 Likes

It can be in anything that replicates to the client.

2 Likes

My bad just forgot to put the script into the starter gui

1 Like