Hey!
So I'm coding a system where it detects if someone enters a planet, and when they do, prints stuff out...
However, my current code can't find anything inside the Region3, despite there clearly being parts in it. Please help!!!!!!!
for i,v in pairs(workspace:GetChildren()) do
if string.find(v.Name, "Planet") and not v:IsA("Script") then
local region3 = Region3.new(v.Attachment1.WorldPosition, v.Attachment.WorldPosition)
print("found planet part")
while true do
print("loop")
wait(0.1)
for i,part in pairs(workspace:FindPartsInRegion3(region3, nil, 500)) do
print(part.Name)
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
if plr then
print("found stuff")
end
end
end
print("hiihihih")
end
end
It prints out "loop" but that's it. It prints it out multiple times.
