I built some scripts where the player gets a child value and they’re supposed to find out what that number is and then send the value in a chat message to get rewarded.
The number is different for all players, so the answer can’t just be handled from one player to all players.
Until that point it’s all fine, but the GUI that tells the players the answer isn’t working, it’s supposed to show you your own value.
I’m gonna send the value script too just in case it’s needed for reference.
Thanks in advance!
Server Script - Makes the value inside the player
game.Players.PlayerAdded:connect(function(p)
local tnumber = Instance.new("IntValue")
tnumber.Name = "tnumber"
tnumber.Value = math.random(100000,999999)
tnumber.Parent = p
end)
Local Script - Is supposed to set the GUI text to the player’s internal value
local players = game:GetService("Players")
local IntValue = players.LocalPlayer.tnumber
while true do
players.LocalPlayer.PlayerGui.TNumberPaper.ImageLabel.TextLabel.Text = tostring(IntValue.Value)
end