Clearly something is wrong here as I am getting an error.
I’m trying to pass this variable into a function inside my modulescript function, yet my script does not recognize it.
Clearly something is wrong here as I am getting an error.
I’m trying to pass this variable into a function inside my modulescript function, yet my script does not recognize it.
AIlevel
is a variable but you are shadowing it with a function parameter that I have to assume you aren’t calling.
you can change local funciton MovementChance(AIlevel)
to just local function MovementChance()
Inserting --!strict
at the very top of your script will help catch issues like these.
Try doing:
until tonumber(AIlevel) >= number