I'm trying to make a Region that will remove anything within it. I'm new to Region3 so I'm starting with just making an example part equal to its size and CFrame to see what it looks like but it's giving me some annoying results.
Instead of the Region's size being equal to the mesh's scale, it's equal to the size of the mesh's parent part instead, even though I clearly specify the mesh's scale, not the parent part's. On top of that, the position doesn't translate either, and I can't understand what's wrong.
local reg = workspace.DestroyerRegion.RegionPart
local mesh = reg:FindFirstChild("MeshR")
local scale = mesh.Scale
local DRegion = Region3.new(Vector3.new(scale),Vector3.new(scale))
local part = Instance.new("Part", game.Workspace)
part.Name = "Example"
part.Anchored = true
part.Size = DRegion.Size
part.CFrame = DRegion.CFrame
This is a big problem because I'm trying to make a death ball that destroys everything it touches, but can't be easily destroyed itself.
Some months ago, I made a forcefield that prevents anything from getting inside it. It works well, but its major flaw was if it touched something that had a simple script like a touched script with hit:Destroy() or something.
So this time I'm going with a tiny part with a large mesh, and trying to use Region3 to be in the same position and size as the mesh so that I can bypass this major flaw. This isn't a bad idea, it's actually sort of like what the gear Chartreuse Periastron does with its shield.
I have looked through the script in the periastron which makes the shield but alas it hasn't helped me much, likely because this Region stuff keeps going over my head somehow.
However the example part clearly shows that I'm doing something wrong, as both the size and position of this Region3 is completely off. What do I do?
