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

How do I connect this GUI to the Leaderboard?

I have this GUI that I made and I don't know how to connect it to the Leaderboard I have. I'm really new to all of this so I'll just add a screenshot so the person who helps me can figure it out. I know basically nothing about scripting or anything like that and this would actually help a lot. https://photos.app.goo.gl/jj6GWDAziXZ4bBKZ6 Screenshots of the script, values, and the ingame view. https://www.roblox.com/library/2953559978/Name-GUI-Help The GUI itself, ignore the description, but there's enough information in the GUI to tell you how to help me with the script.

1 answer

local LeaderstatsFolder = game.Players.LocalPlayer:WaitForChild("leaderstats", 10)
-- WaitForChild yields the script until it finds the name in the given instance
-- It has 2 arguments: Instance:WaitForChild(x, y) x = name of object (string) y = seconds of how long you will want it to yield (optional)

local NameValue = LeaderstatsFolder:WaitForChild("Name")
NameValue:GetPropertyChangedSignal("Value"):Connect(function()
	NameTextLabel.Text = NameValue.Value -- update the text
	-- you'll have to make a NameTextLabel variable (local NameTextLabel = guiFrame...)
end)
-- GetPropertyChangedSignal fires when the given property (in this case "Value") changes.

1 comment

0

"local NameTextLabel = guiFrame..." I have absolutely no idea what you mean and I cannot find it on Google. Could you explain?

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