What do you want to achieve? Keep it simple and clear!
I wanna achive what if intvalue = 5 text is = 5 too
What is the issue? Include screenshots / videos if possible!
Issue is: When i join game script counts only when value = 1. (My standart text is 0). When value is 50, text still 1. No idea why. Here is a screenshot:
I tryed look on youtube and DevHub, but didn’t find anything
Here is my script:
local MoneyLabel = script.Parent
local Value = workspace.Factory.PlayerMoney
while true do
MoneyLabel.Text = Value.Value
end
Stop this. Don’t use while loops for this kind of stuff. When an event is available, use it.
local MoneyLabel = script.Parent
local Value = workspace.Factory.PlayerMoney
Value.Changed:Connect(function()
MoneyLabel.Text = Value.Value
end)
But regarding the issue, it must be caused due to incorrect communication of the server and client.
Could you provide the scripts that are being used for this?
Okay sure, but first i will test that script.
Wait what. Alright then, have a nice day.
Okay nevermind, it works perfectly thanks
Have a nice day too tho. Thank u again!
local MoneyLabel = script.Parent
local Value = workspace.Factory.PlayerMoney
Value.Changed:Connect(function()
while wait() do
MoneyLabel.Text = Value.Value
end
end
end)
Utk4_e
(Utk4_e)
August 20, 2021, 3:22pm
9
You probably forgot to add the game
.
local MoneyLabel = script.Parent
local Value = game.workspace.Factory.PlayerMoney
while true do
MoneyLabel.Text = Value.Value
end
Bro, u can say just workspace, problem was not in that, i just forgot to write it solved
Utk4_e
(Utk4_e)
August 20, 2021, 3:25pm
11
Mark as “solved” instead. That’s what that button is for.
Uhh where is it? Can’t find it lol
Utk4_e
(Utk4_e)
August 20, 2021, 3:28pm
13
Solved button, near the button.
U mean solution? Already then tho
Utk4_e
(Utk4_e)
August 20, 2021, 3:30pm
15
You haven’t marked. Please check again.
Check messages at top ayooo, i marked it
Utk4_e
(Utk4_e)
August 20, 2021, 3:31pm
17
Unfortunately it doesn’t show up for me.