So jeah. You can kind of imagine it like a GTA Spawn car functionality. So you press on a GUI button to spawn the car and it will spawn the car near you. Now I need to find out how to get the info that nothing is inside one of the parts in my table. Im new with Region3 and this didnt work so I would appreaciate some help :))
This is in a normal Script, ServerscriptService in a remoteevent I am firing from the client.
game.ReplicatedStorage.Events.CarShop.SpawnCar.OnServerEvent:Connect(function(player,carName,carColor)
local carspawns = game.Workspace.MISC.CarSpawns:GetChildren()
for i,v in pairs(carspawns) do
local region = Region3.new(v.Position - (v.Size/2),v.Position + (v.Size/2))
local parts = game.Workspace:FindPartsInRegion3WithWhiteList(region, player.Character:GetDescendants())
for _, part in pairs(parts) do
print("Something is in the way")
end
end
end)
EDIT: I researched abit more and found IsRegion3EmptyWithIgnoreList. which gave me the result I wanted.
