Self explanatory.
local str = "Programmer" game:GetService("Players").PlayerAdded:Connect(function(plr) if plr.TeamColor == BrickColor.New("Lapis") then plr.leaderstats.Job.Value = str else print("Hi") end end)
Idk why it isnt working. Maybe try this method
local str = "Programmer" local Team = game:GetService("Teams"):WaitForChild("Your-Team-Name") --put here ur team name game:GetService("Players").PlayerAdded:Connect(function(plr) if plr.Team == Team then plr.leaderstats.Job.Value = str else print("Hi") end end)
I always use this method(maybe it working more properly)
check if the script is disabled, and make sure you set the teamcolor exactly the same value as lapis
I think the problem is that you do NOT set the TeamColor for the player...