Region3 tutorial (Easy Difficulty)

(0 --[[X co-ordinate of top-front-left of region]],0--[[Y co-ordinate of top-front-left of region]],-3--[[Z co-ordinate of top-front-left of region]])
2 Likes

Is there any way you can illustrate this so I can understand it more. You could also add some illustrations throughout so it makes it easier to understand in general. For example, show what happens to the part when one or even two of the parameters of region3 are altered. Thank you.

2 Likes

I think he chose it to not parent it since parenting it within an intance slows down the performance.

I might be wrong here but I believe that’s the reason why.

3 Likes

for some reason, whatever number I put in-game.Workspace:FindPartsInRegion3() in the third parameter it always stops at some point no matter what. It doesn’t matter if I put in a huge number it stops working no matter what, is it possible to fix this?

2 Likes

here is the script:

local player = game.Players.LocalPlayer
local RemoteEvent = game.ReplicatedStorage.RemoteEvent

RemoteEvent.OnServerEvent:Connect(function(player)
local c = player.Character
local region = Region3.new(Vector3.new(1,1,1), Vector3.new(10,10,10))
local Rt = workspace:FindPartsInRegion3(region, nil, 20)
local part = Instance.new(“Part”, game.Workspace)
part.Transparency = 0.1
part.Anchored = true
part.Size = region.Size
part.CanCollide = false
part.CFrame = c.HumanoidRootPart.CFrame + c.HumanoidRootPart.CFrame.LookVector * 7
for i, part in pairs(Rt) do
if part.Parent:FindFirstChild(“Humanoid”) ~= nil then
part.Parent.Humanoid:TakeDamage(10)
end
end
wait(.1)
part:Destroy()
end)

2 Likes

the region check only works in tht one frame tht u check it in it doesnt have a duration

1 Like

I wouldn’t recommend this at all, it greatly effects performance and is slower.

3 Likes

I have a questions.Is it possible to create terrain from Region3 ??.I know this questions is out of topic bit I just want to know

1 Like

Have you read the rules? It states that you should explain instructions well.

Provide instructions ; step-by-step instructions should be clear and well-explained.

2 Likes

Doesn’t make any sense, I’m using option .

1 Like

i did provide instructions but i said no for explaining how the region3 works behind the scenes since i wanted it to be ez for new ppl, i am showing them how to use it here not how it works

1 Like

You are just tell them what it does, which can they can easily find out from the developer hub. This tutorial has literally no use at all. :I

It makes alot of sense, the article thoroughly explains why its a bad idea. Roblox staff themselves are advising that you don’t use the patent argument.

1 Like

I literally don’t understand. They did parent their model at the end of the code line.

You suggested that the OP shouldn’t use this practice, and instead use the instance.new() parent argument

1 Like

Well, sorry for the mistake. My bad.

1 Like

Im trying to do something with region3s which is create them from the position and size of a part thats in a folder, and its supposed to play some sounds but the problem is that when there is more than one part in the folder it starts breaking really bad.

Can you make an updated tutorial with the new Overlap spatial APi thingy?

Don’t you have to put the region3 inside the parenthesis in FindPartsInRegion3()?

This tutorial DEFINITELY has a use and is very helpful. Just because you don’t think so doesn’t mean your correct. @crazygamer817 thanks a lot for this :grin:

1 Like