I want to stop a value changing so the stun wont become false during wait. (Without using loops otherwise it crashes the game/makes it really laggy)
--V is a character --Stunned is a bool value task.spawn(function() v.Stunned.Value = true --v.Stunned.CanChange = false wait(stunTime) --v.Stunned.CanChange = true v.Stunned.Value = false end)
Ah, a stunned system. I just struggled with one of this a little while ago. The fix I came up with was not letting the player get stunned if they are already stunned.
if v.Stunned == true then return else v.Stunned.Value = true task.wait(stunTime) v.Stunned.Value = false end
If this wasn't what you needed sorry, but this is what I did for my system.