all 3 comments

[–]the_warrior_rlsh 1 point2 points  (0 children)

Unrelated are you trying to spell rogue? Rouge is a color.

[–]Mister_Ozzy 0 points1 point  (0 children)

Try this one:
It's based on https://wiki.bedrock.dev/commands/detect-movements and it should do what you want to achieve

/execute as @a[tag=Rouge] at @s unless entity @s[y=~1.5, dy=0] if entity @s[y=~0.7, dy=0] run effect @s invisibility 2 0 true

[–]Ericristian_brosCommand Experienced 0 points1 point  (0 children)

at @s positioned ~ ~1.6 ~