Hi everyone, I'm making an obby game in which there are no stages, but there is a "skip stage" product (doesn't really make sense but don't worry lol). In order to know what stage the player is in, I'm using Region3.

I now need a script that, when I press a Ui Button, will tell me what region the player is in (there are 10 regions) and will bring up the right DevProduct depending on what region the player is in.

I hope I made myself as clear as possible since this problem is slightly hard to explain.

Here is some sort of script I made that creates the Regions and prints whenever a player is in Region1:


local Region1 = Region3.new(Vector3.new(-12.735, 31.292, 72.565),Vector3.new(86.265, 130.289, 171.565))
local Region2 = Region3.new(Vector3.new(-12.735, 131.292, 72.565),Vector3.new(86.265, 230.289, 171.565))
local Region3 = Region3.new(Vector3.new(-12.735, 231.292, 72.565),Vector3.new(86.265, 330.289, 171.565))
local Region4 = Region3.new(Vector3.new(-12.735, 331.292, 72.565),Vector3.new(86.265, 430.289, 171.565))
local Region5 = Region3.new(Vector3.new(-12.735, 431.292, 72.565),Vector3.new(86.265, 530.289, 171.565))
local Region6 = Region3.new(Vector3.new(-12.735, 531.292, 72.565),Vector3.new(86.265, 630.289, 171.565))
local Region7 = Region3.new(Vector3.new(-12.735, 631.292, 72.565),Vector3.new(86.265, 730.289, 171.565))
local Region8 = Region3.new(Vector3.new(-12.735, 731.292, 72.565),Vector3.new(86.265, 830.289, 171.565))
local Region9 = Region3.new(Vector3.new(-12.735, 831.292, 72.565),Vector3.new(86.265, 930.289, 171.565))
local Region10 = Region3.new(Vector3.new(-12.735, 931.292, 72.565),Vector3.new(86.265, 1030.289, 171.565))

while true do
	wait(1)
	local partsInRegion = workspace:FindPartsInRegion3(Region1, part, 1000)
	for i, part in pairs(partsInRegion) do
		if part.Parent:FindFirstChild("Humanoid") then
			print("Player found in region: "..part.Parent.Name)
		end
		
	end
end