Snapping to Walls: Placement System

In Bloxburg, you place an object in a wall. And it snaps to the side of the wall your mouse if on with correct orientation and everything. I am trying to do the same. This code doesn’t work that good and it works with world space not local. I do not know how to fix this, I am thinking it is :VectorToObjectSpace or something or am I wrong? Please Help! Thanks.

3 Likes

Sorry for being so late. I am also wondering how they did it. I think they used Mouse.TargetSurface or maybe something like that :confused:. Sorry that I can’t help you, but have you tried it out?

this post is old. i know a lot more now. I dont need this for my game anymore and i already know how to do this myself lol

1 Like

did you get a solid solution? I got something decent but I think I’m using bad coding habits

Can you give a place file or an uncopylocked place of it? I would really appreciate that! It can help me learn more about it! Please?

edit: here is the example file

wallsnappingdemo.rbxl (34.2 KB)

2 Likes

Thank you so much! That will help a lot! :smiley: