Commands working ingame but not in my loop function

I have a series of commands that work when I copypaste them in game but don't work in my function. My logs aren't showing any error, and other loop commands work just fine.

Continue to help post