Like, i know that i can use value.Changed but i don’t get how i should use it properly, my current script is this way:
local value = game.ReplicatedStorage.vals.Winner
local winnerValue = value.Value
if value.Value ~= "" then
script.Parent.Text = winnerValue
The objective here is to detect when the Winner IntValue is not empty, then take it’s value to replace on a ScreenGui that i am using (when i use While True loop it works, i just want to learn how to use value.Changed properly)
Ah I was just working on this, but it seems you did it the way I did, which was a function so I couldn’t tell you how to do it different, but the ) from end needs to be together, and make sure to indent and organize so you don’t go crazy with scripts!
If you are talking about Int values which primarily hold integers, IntValue.Value == "" shouldn’t work with while loops either because int values will never be "" because they are not strings they’re numbers (integers) , so they will never empty unless you define empty as 0( the default value) . So this means that IntValue.Value ~= "" will always be true no matter what the int value is. Otherwise if you mean string values, that contain/hold strings then this if value.Value ~= "" then is “valid”.
Edit: Never mind i just realized that my previous answer (now edited post) shouldn’t actually be the reason why this inst working but just fyi winnerValue's new value is passed through the event so local winnerValue = value.Value isn’t needed.