Bad hiding under a bed mechanic

I’m not really experienced with lua yet, and I tried to making a hide mechanic where you can slip under a bed to avoid being spotted by monsters (the monster detection thing I can figure out), however it’s incredibly wonky and isn’t made well at all.

Sometimes you get stuck sleeping in the bed (seat disabled, unable to jump), and always trip instantly after leaving it (player should be teleported out of it, but it just doesn’t work as it should 70% of the time)

robloxapp-20220823-1923302.wmv (4.0 MB)

It’s just a seat you get put in after completing a proximity prompt, but I know there’s a much easier way I can probably do this.

Can somebody tell me a quick & simple way to remake this? I still want to be able to sleep on the bed without getting permanently stuck or tripping when you leave it. (and hopefully have it look alright in multiplayer)

2 Likes

Can you show us your code? gfwfwgw

Found a better solution for this elsewhere.