i have a script where if the power text is "0" then its supposed to change the value of a numbervalue in replicated storage to 1
i also have a modular script, which is supposed to check if the value is set to 0, if not, its supposed to do nothing
issue is whenever the value IS set to 0, the rest of the function still happens, how do i fix this?
#Modular script activates function it isnt supposed to
1 messages · Page 1 of 1 (latest)
Probably because it will fire everytime the text changes
Since you're using GetPropertyChangedSignal("Text")
Maybe you need to make some kind of debounce
debounce?
Yeah like:
local debounce = false
if debounce == false then -- this would be inside the local function you made
end
And then after this check, you set debounce = true
server
if debounce == false
debounce = true
end
are you changing the value on client or server
local scripts were client sided right?
** You are now Level 7! **
Yeah
yes
Scripts are server sided