so i want to have scripts check things but i have a problem, i don’t know if simple loops like this:
while task.wait(3) do
--here the script sees if a value is true or false or if the value is 10 or like 5
--here is where the script changes a textlabels text if its a certain value
end
lag the game when theres multiple scripts suddenly running every 3 seconds
i hope someone can help since idk if lag spikes in my game are coming from these loops
also should i just use
valuename.Changed:Connect(function() --i dont remember if its :Changed or that
--code here
end)
The .Changed would work too for OP, but that would fire everytime a property on it is changed, if it’s just a StringValue then it’s fine but probably best to use GetPropertyChangedSignal