Hi, I was wondering if you guys could give me tips on how to go over detecting adjacent parts or bricks. What functions are usually used? I'm so lost. Thanks in advance!

8 comments

1

Could you give more information on your current problem? Because best solution depends on the situation, sometimes you might want to use raycasting, other time touched event would work better.

0

I'll second that. You could raycast, but it could be comparatively expensive compared to what might be wanted.

0

I'm intending on creating a sort of fog of war for an RTS I've been working on, it's sort of a risk-type RTS (map based).

0

Then it sounds like you should learn how to use raycasting. There is no real definitive answer or code I can give you, but check out how rays work: http://wiki.roblox.com/index.php?title=Raycasting

0

Thanks for the tip

0

http://wiki.roblox.com/index.php?title=API:Class/BasePart/GetTouchingParts This may help somewhat, if you don't have to be exact.

0

FindPartsInRegion3 is more likely to be helpful than raycasting for some kinds of fog-of-war

0

I believe you could create a table and go game.Workspace:GetChildren() inserting them into a table then finding the magnitude of all parts within the workspace and then do something if a part has a magnitude of 2 or 3 whatever you want it to be