I want a Job system in which when you choose your job, i'll change your "Job" on the leaderboard, this works with StringValues but I can't get it to work, any help? heres the script
**game.Players.PlayerAdded:connect(function (p) local lead = Instance.new("IntValue") lead.Name = "leaderstats" local rank = Instance.new("StringValue", lead) rank.Name = "Job" rank.Value = "Unemployed" rank.Parent = lead --wait() lead.Parent = p --print(rank:GetFullName())
game.StarterGui.ScreenGui.Frame.TextLabel.Farmer.TextButton.MouseButton1Click:Connect(function(cat) local function cat() if rank.Value == "Unemployed" then rank.Value.Changed = "Farmer" else rank.Value = "Unemloyed" end
end end)
end)**

5 comments
So in your case, you want a TextLabel to have text as the StringValue has?
Nope, I want the text in the leaderboard (here, is unemployed for now); but when you'll click a button called "Farmer", the leaderboard will change the StringValue "Unemployed" to "Farmer"
Please make this more readable, please. Its hard to understand if it is one script or two, place the script(s) in a code block so i and others have an easier time answering.
You can use a RemoteEvent to send a message from a local script to a server script to fire a function on the server changing the "Job" of the player when the button is clicked
Also you're indexing through the StarterGui, which is what holds the Guis that the player starts with, not the Guis that the player has, so you should rewrite your code in a Local Script and use game:GetService("Players").LocalPlayer.PlayerGui instead of StarterGui