Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make a script where the leaderstat updates a billboardGUI above a players head?

Salutations. I am making this script for my Event Center at my establishment.

The user gets points for getting things correct during the training. This is the Points BillboardGUI: https://prnt.sc/r8s10q

I want the BillboardGUI to change when the Leaderstat is changed.

I've tried looking up how to do this for so long and can only find stuff about GUIs but not BillboardGUIs.

Please help if you know! Any answers will help!

Please don't get mad at me for asking for a request.

3 comments

0

Use a server script and a while loop

0

I agree with killerbrenden.

0

Use my answer not killerbrenden Idea as this can cause lag mine only changes upon the value changing

1 answer

✓ Accepted answer

Make it so

game.Players.LocalPlayer.leaderstats.STATNAME.Changed:Connect(function()
	game.ReplicatedStorage.ChangeStatBoard:InvokeServer()
end)

Is in StarterPlayerScripts and

game.ReplicatedStorage.ChangeStatBoard.OnServerInvoke = function(Player)
	Player.Character.Head.StatBillboard.TextLabel.Text = tostring(Player.leaderstats.STATNAME.Value)
end

I did write this from memory and not in roblox studio so forgive me if something is wrong

4 comments

0

You could also use a while loop if you wanted.

0

while loops cause lag mine does not

0

This wouldn't work since there is no "ChangeStatBoard" in replicated storage. Or it could be that I put these scripts in two different local scripts in StarterPlayerScripts

0

Apologies, I created a BindableEvent in ReplicatedStorage named "ChangeStatBoard." This is the error code. https://prnt.sc/r9agqf

This discussion is preserved as it was. New answers, comments, and votes are closed.