Changed Value display on GUI

  1. **What do you want to achieve? When I change a Value that is display on Surface GUI the GUI don’t update the text tu the new value

  2. What is the issue?

  3. What solutions have you tried so far? I tried everything please help

1 Like

I usulaly use a loop to do this

Can you explain, or make an example?

For example, i use

While true do
– Inser the text you want to update
End

However,this will constantly update it

Remember to add a wait () too

Ok, let me try this thank you!

Btw,use server scrupt for the get property changed signal

And send a remote event,i am not sure about this.Try using a server script and fire it to clinet

Not to be rude, but do not do what hellothere suggested, if he suggested you to have a loop.

Can you try to explain exactly what you’re trying to @askirewide ?

I want to display a Value of an INT on a SurfaceGUI, but when I change the value (during the game) the Value on the GUI doesn’t Update, so I don’t know how to update this

Have you checked if the value updates correctly in replicated storage?
You also have to use WaitForChild, whenever you’re on the client and tries to reference something, to make sure it is loaded in on the client before referencing it.

local IntTime = ReplicatedStorage:WaitForChild("IntTime")
local GUI_IntVal = Gui:WaitForChild("Var3")

You would also want to connect the function before initializing the value

IntTime:GetPropertyChangedSignal("Value"):Connect(function()
  GUI_IntVal.Text = IntTime.Value
end)
GUI_IntVal.Text = IntTime.Value

Edit: Make sure to open up your output and check if any errors occur.

My ServerScript is now this:

local GUI = game.Workspace[“AskiMed Check System 1.0”][“AskiMed Check 1.0”].Screen.Online.SystemOnPreformatted text
local ReplicatedStorage = game.ReplicatedStorage

local IntTime = ReplicatedStorage:WaitForChild(“Time”)
local IntWait = ReplicatedStorage:WaitForChild(“Waiting”)
local IntTreat = ReplicatedStorage:WaitForChild(“Treatement”)

local GUI_Time = GUI:WaitForChild(“Var3”)
local GUI_Wait = GUI.NWait:WaitForChild(“Var1”)
local GUI_Treat = GUI.NTreat:WaitForChild(“Var2”)

IntTime:GetPropertyChangedSignal(“Value”):Connect(function()
GUI_Time.Text = IntTime.Value
end)
GUI_Time.Text = IntTime.Value

IntWait:GetPropertyChangedSignal(“Value”):Connect(function()
GUI_Wait.Text = IntWait.Value
end)
GUI_Wait.Text = IntWait.Value

IntTreat:GetPropertyChangedSignal(“Value”):Connect(function()
GUI_Treat.Text = IntTreat.Value
end)
GUI_Treat.Text = IntTreat.Value

But still not working, when I start the game the Screen show the correct Value but when I change it (from output or properties) it continue show the starting value

If you change a value Instance’s Value while play-testing in client mode (blue border around game view), the new value won’t replicate to the server since it will change only locally, and GetPopertyChangedSingal or the Changed event won’t be able to detect the value

Make sure that you change the value while you’re in server mode (green border around game view), you can do so by going to the TEST tab and clicking the Current: Client button

Thank you so much, to every one!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.