I am developing a game, and I'm trying to add a tag to your player that displays how much money you have, so the game can read that, and if you have a certain amount of rebirths you can go through a door.
Here's what I got.
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local Name = Players.LocalPlayer.Name
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Tag = Instance.new("NumberValue")
Tag.Name = "Tag"
Tag.Parent = Workspace.Name
print(" name is" ..game.Workspace[Name].Tag.Value ..".")
but, it says localplayer is a nil value, can anyone help with that?

4 comments
The server doesn't have its own local player - LocalPlayer will always be nil on the server. You're gonna need to use a Player added event
The server cannot access the LocalPlayer property of the Players service.
^ Technically, it can, but it'll be nil
That's what I meant, but ok.