local val = Instance.new("StringValue", script)
local function update()
print("Changed", val.Value)
end
val.Changed:Connect(update)
val.Value = "Test"
val.Value = ""
val.Value = "Test2"
You’ll get the output:
Changed Test2 (x3)
The correct behaviour should be ONE trigger per heartbeat.
Changed Test2
or atleast
Changed Test
Changed
Changed Test2
It should not have printed 3 times, and if it did it should not have printed same value every time.
Like @EmeraldSlash said, check the value of Workspace.SignalBehavior in explorer. If it’s deferred (which seems to be the default value in my experience), try changing it to anything else besides that, and it should print this:
Keep in mind this won’t exist forever. Eventually, the default will likely become Deferred and long after that, Immediate will be removed entirely, I wouldn’t recommend architecting your code to rely on the behaviour.