Still have questions? Join our Discord server and get real time help.
0

ABK2017 391
9 months ago

I'm not sure why this is proving so difficult, but I have a leaderstats script that works as well as an overhead gui script which works. I would like to change the overhead gui text, based on the leaderstat value of the player ie - a title/rank system. Could I not just add an "if" statement at line 3 that checks for the players leaderstats.Money.Value? Something that would end like Money.Value >= 2000 then...? Thanks. This has been my Achilles Heel lately.

game.Players.PlayerAdded:Connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)

wait(1)
local gui=Instance.new("BillboardGui")
gui.Size=UDim2.new(3,0,4,0)
gui.StudsOffset=Vector3.new(0,1,0)
local name=Instance.new("TextLabel")
name.Parent = gui
name.BackgroundTransparency = 1
name.Text = "Noob"
name.Size = UDim2.new(1,0,1,0)
name.Position=UDim2.new(0,0,-0.41,0)
name.TextColor3=Color3.new(255,255,255)
name.FontSize = "Size18"
end

function onPlayerEntered(newPlayer)
newPlayer.Changed:Connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end


0
You should be using local functions, and instead of changed simply wait for the character. User#19524 88 — 9mo
0
Ok, I will change to CharacterAdded ABK2017 391 — 9mo

0
Edited 9 months ago

If you respond to my DMs, I can help you. (This reply contains a quick screenshot of what I've sent you)

https://imgur.com/a/U139632

Response will be edited with final solution.