What do you want to achieve?
A working region3 that detects the player/character.
What is the issue?
The region3 isn’t detecting me when I go inside of it.
What solutions have you tried so far?
I checked to see if the size of the region3 was actually what it was supposed to be, and it was.
local part = script.Parent
local region = Region3.new(part.Position - part.Size/2, part.Position + part.Size/2)
local parts = workspace:FindPartsInRegion3(region, part, 20)
while wait(1) do
for i, part in pairs(parts) do
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
print(player.Name)
end
end
end
Maybe check another print() statement that every Part that’s inside the region is actually being printed?
local part = script.Parent
local region = Region3.new(part.Position - part.Size/2, part.Position + part.Size/2)
local parts = workspace:FindPartsInRegion3(region, part, 20)
while wait(1) do
for i, part in pairs(parts) do
print(part)
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
print(player.Name)
end
end
end
local part = script.Parent
local region = Region3.new(part.Position - part.Size/2, part.Position + part.Size/2)
local parts = workspace:FindPartsInRegion3(region, part, 20)
while wait(1) do
parts = workspace:FindPartsInRegion3(region, part, 20)
for i, part in pairs(parts) do
print(part)
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
print(player.Name)
end
end
end