Hey guys, I Am trying to make a script where you can join a job in my Roleplay game by clicking on a 'for hire' sign on the window of a business place, but i keep getting an error, can someone help me?
here is the script by the way
local job = false
script.Parent.ClickDetector.MouseClick:connect(function(newplayer)
game.Players.LocalPlayer.Character.Head.Job.JobTitle.Text = ("BlueMart Employee")
job = true
while true do
game.Players.LocalPlayer.leaderstats.Money.Value = game.Players.LocalPlayer.leaderstats.Money.Value + 75
wait (5)
end
end)
I Keep getting an error in the game, it says
Workspace.Job.Sign.Now Hiring:3 attempt to index field 'LocalPlayer' (a nil value)

1 comment
Are you using a normal script in the sign? If so that is your problem. You can only access local player from a local script.