This is what I have so far but it only checks the value once
local PlayTime = game.Players.LocalPlayer.leaderstats.timeplayed.Value
local Text = script.Parent
Text.Text = PlayTime
This is what I have so far but it only checks the value once
local PlayTime = game.Players.LocalPlayer.leaderstats.timeplayed.Value
local Text = script.Parent
Text.Text = PlayTime
You will have to do a while loop or a changed connect so it updates when the value is changed. So you can do
local PlayTime = game.Players.LocalPlayer.leaderstats.timeplayed.Value
local Text = script.Parent
Text.Text = PlayTime
while wait() do
Text.Text = PlayTime
end
lol that doesnt work no error in the output
Try this:
while wait(1) do
script.Parent.Text = game.Players.LocalPlayer.leaderstats.Money.Value
end
Thats a old script i got for a money ui just change some stuff
Maybe donât make the variable for the textbox the same as a property, like Text, which is a property.
local TextBox = script.Parent
that really doesnt change anything lol
Ohhh try doing
local PlayTime = game.Players.LocalPlayer.leaderstats.timeplayed
local Text = script.Parent
Text.Text = PlayTime
while wait() do
Text.Text = PlayTime.Value
end
I wouldnât use a loop but rather a changed event
PlayTime:GetPropertyChangedSignal('Value'):Connect(function()
Text.Text = PlayTime.Value
end)
This code is more efficient
I think you can maybe wrap it with a .Changed:Connect(function()
â your GUI.Value = leaderstats.Value
end)
Nevermind @lluckvy did it too and better.
Players.savagebrosyoutube.PlayerGui.ScreenGui.TextLabel.LocalScript:5: attempt to index number with âGetPropertyChangedSignalâ
Can I see your script? I didnât give you the variables
local PlayTime = game.Players.LocalPlayer.leaderstats.timeplayed.Value
local Text = script.Parent
PlayTime:GetPropertyChangedSignal(âValueâ):Connect(function()
Text.Text = PlayTime.Value
end)
Remove âValueâ, youâre already checking the value through :GetPropertyChangedSignal
thanks for your help. much appreciated
one question how would i make it say Time Played: ânumberâ
instead of just like 40
omg i actually did it by completely guessing lol
To add quotations? Like this
Text.Text = '"'..PlayTime.Value..'"'
i just did Text.Text = "Play Time "⌠PlayTime.Value
uhh i think the forum changed the 2 dots to three lol
That would also work as well