Ok so the function of this script is to check if someones WantedLevel is 1 or greater then 1 and if it is then it is to change their profession under leaderboard to Criminal. But it does not seem to be working it has no errors in the script and is located under ServerScriptService.
local player = game:GetService("Players").LocalPlayer
function Criminal()
if player.leaderstats.WantedLevel.Value == 1 or player.leaderstats.WantedLevel.Value > 1 then
player.leaderstats.Profession.Value ="Criminal"
end
end
script.Parent.MouseButton1Down:connect(Criminal)
Just figured out I am using a MouseButton1Down script what am I spouse to use?

1 comment
Can't use LocalPlayer in server scripts