Hey y’all! I am currently doing a system which allows me to put parts anywhere on the map and assign them as a region. ← Not region 3. However just a region like: The Bar. Now, I wan’t to check if a player is inside this region. The problem now: I am using Workspace:GetPartsInPart to check if someone is in a region. I have also assigned to the OverlapParms a whietelist with the descancts of my characters body. When I walk now into the Bar, from the Streets it shows me: Streets ; 7 parts in. Bar ; 7 parts in. But that’s totally not true. I am in the Bar, not at the Streets but when I walk out of the Bar it only shows me: Streets ; 7 parts in. Bar; 0 parts in which is now correct. I have no clue how my script get’s to 7 people in the region street when I am completely in the region Bar. I’ll show you a picture which proves BOTH regions are not overlapping:
The region Street is not overlapping which the region Street so anyone knows how to fix this?
Script:
while wait(0.5) do
for _,region in pairs(zones) do
--local parts = workspace:FindPartsInRegion3WithWhiteList(region.Region,game.Players.LocalPlayer.Character:GetDescendants())
--local parts = workspace:GetPartBoundsInBox(region.Object.CFrame,region.Object.Size,overlapParms)
local parts = workspace:GetPartsInPart(region.Object,overlapParms)
print(#parts,parts,region.Object.Name)
did you try a third region and see if it shows multiple zones when you are in the third region? That might help narrow down a solution. If it still has street when you are in region 3, then most likely its with the street region.
can you show me your entire script, i have 50% confidence that i will be able to read through whatever mess that comes my way
i can hardly believe that this below is actually all of your code
while wait(0.5) do
for _,region in pairs(zones) do
--local parts = workspace:FindPartsInRegion3WithWhiteList(region.Region,game.Players.LocalPlayer.Character:GetDescendants())
--local parts = workspace:GetPartBoundsInBox(region.Object.CFrame,region.Object.Size,overlapParms)
local parts = workspace:GetPartsInPart(region.Object,overlapParms)
print(#parts,parts,region.Object.Name)
could it be possible that its because the character you’ve assigned in overlapParams was an old player and the game didnt pick up on the new player that is created
or is it possible that the script on the server ran, but because the character hasnt been added, it did not add any character to the overlapParams