How to Resize the Edges of Parts When They're Not on a Ground/Wall (?)

Hey everyone! Sorry, I’m really, really not sure how to phrase what I’m trying to accomplish. Basically, I have a system that sprays paint based on where a bullet lands, which works flawlessly thus far. However, I’ve run into a semi-related issue where paint can sometimes hover in the air rather than wrap around a part.

I’ve looked around a fair bit to try and figure out some solutions, but nothing I’ve come across has worked thus far! The parts are all squares, no meshes or cylinders used.

I’m not sure how I would go about resizing these parts based on whether or not they’re in the air, so any help is appreciated! Thanks a ton.


is the paint a decal?

if it is then it will “come out” of the part in ur case

1 Like

No, each part is individual.

I have a modulescript that handles all the paint systems.

Show us the scripts so we can help

can u show the part of ur code which is cloning the paint?

The paint cloning just gets the positioning of the projectile that landed and creates a part there using the CFrame normals, they wouldnt have anything to do with the resizing for what I’m attempting to do I don’t believe.

I just need a pointer as to where to look for this kinda thing, any kinda system I can use to figure out whether or not a part is hanging off an edge. I attempted something with raycasts but it didn’t work out too well.

Just updating you all!

I did find a solution, which was to raycast from every single corner of the part toward the wall it’s merging with in order to determine if there was enough room. If there wasn’t, I resized accordingly.

Marking as solution, thanks for the help!