Yes. It is a glitch, and glitches are not illegal.
Using an unintended interaction in a game is not a crime, though it can still break the rules of a specific experience. Plenty of Roblox games explicitly ban exploiting, and that is a moderation matter rather than a legal one.
The distinction is worth keeping straight: the worst realistic outcome from a glitch is a ban from that game, not a knock on the door. If you are unsure where a particular experience stands, its rules page will say.