Google translate, sorry
First, I created a new Script in ServerScriptService and wrote in this code:
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = game.Players.LocalPlayer
local brown = Instance.new("IntValue")
brown.Name = "Brown"
brown.Value = 0
brown.Parent = leaderstats
end)
Further, in a Workspace created LocalScript and wrote this code:
local player = game.Players.LocalPlayer
local brown = game.StarterGui.GameUserInterface.HudGui.MainFrame.PlayerStats:WaitForChild("BrownMaterial")
while true do
brown.Text = player:WaitForChild("leaderstats"):WaitForChild("Brown").Value
end
Everything works fine, except for the writing values from "Brown" (leaderstats) in my GUI(BrownMaterial is TextLabel)

1 comment
Thank you for your response, but I did not solve my problem :c .I changed my LocalScript to yours, but nothing changed. In the output there are no errors. I think the problem is that the LocalScript can not change the TextLabel with the value of leaderstats. How to solve it?