I'm trying to make a datapack and a I have a function and when I call it normally within code or Minecraft it works fine and if I run the command execute as @e[tag=robot] if block ~ ~-1 ~ air run function robot:simulate_gravity in the code it doesn't work but inside Minecraft when I call it from the chat it does work.
Any ideas why?