I’m trying to create a sort of sidepart system, I have created an attribute that is a boolean, now I’m trying to figure out if that part is a side or not, I have included an image of what I’m trying to achieve:
I’m sorry if it’s vague, but it’s the best I can do.
I wasn’t able to find any module or any tips on how to check if a part is being Touched
/Collided
with on all sides or not
Im not sure if i can understand the purpose of this model or maybe im misunderstanding
It’s for detecting if an enemy I’m working on can attack the part or not, I just have a list of parts and the goal is to make it not attack the centermost part, only the outsides
Outside of what exactly?
Char limit
Outside of the other parts, there’s a folder that includes all of the parts currently a part of “the model”
The goal is to make a boolean that shows whether the randomly selected part from the folder is one of the green parts or not.
You can simply add a boolean attribute to the inside part named for example “Ignore”, you can then check after getting the random block if that random block has the Attribute “Ignore”, and if it doesnt, the enemt destroys it i guess?, and if it does, you can i guess choose another random block:
local randomBlock = -- a basePart as a randomBlock
if randomBlock:GetAttribute("Ignore") then
-- part is in the inside, ignore
else
-- part is in the outside, do stuff here
end
Well ye, that was my plan. (as stated in OM(original message)) Problem is, I have no idea how I’d go about checking whether said part should have the attribute.
I was thinking about detecting whether each side of the part was getting .Touched
, but that sounds extremely inconvenient and also difficult.
I just showed you how to, you can create an attribute inside the Inside part named “Ignore”, and then you can check if the part has that attribute, if it does, ignore, it doesnt, do stuff
Problem is, the part gets Cloned from ReplicatedStorage and put in the workspace, since I’m working with a part builder. So I can’t just give the parts the attribute, I need a way of detecting whether they should have it or not.
Bumping because this thread was of no use, all information discussed was already provided in the OM