Ok, so I have a fair amount of experience in roblox studio and by no means am I new…
I have no idea why this elseif statement does not work, when I say does not work, I mean it doesn’t output true.
elseif (tick()-players[plr]) <= 1 then... Note: (tick()-players[plr]) prints 0.58235…etc, I have type checked and it is also a number type
The rest of the script literally would have nothing to do with this as it’s a simple debounce check, if your interested yes this is done on the server (just wanted to point that out)
Ima have to leave so please just provide any information, I know i’m providing limited info, I will provide as much as I can if necessary…
Ok, i’m back after screwing around a little I think the issue lies with this (tick()-players[plr])
This was working before, but after adding a debounce it stopped working for some reason (I’m positive the reason isn’t to do with the debounce since when I claimed to be screwing around I actually swapped the statement in my question to elseif 0.5 <= 1 then and it did return true so I at least know it’s not do with my debounce nor a engine bug)
I think having more info on the if statement as a whole might provide some insight. Is it possible that the first condition (in this case, ‘something’) is true and therefore the second condition in the elseif is never reached?
if (something) then -- is something true here?
-- this code might be running
elseif (tick()-players[plr]) <= 1 then
return true -- elseif will never run if the first condition in the if statement was true
end