I trying to make a Totally Accurate Battle Simulator type of game and I am making the adding-fighter feature and The GetPartsInPart is very inconsistent:
This is some of the code that I suspect is the issue.
CurrentBox:PivotTo(CFrame.new(SendRay().Position)) -- returns raycast
local filterObjects = {CurrentBox}
local maxObjectsAllowed = math.huge
local params = OverlapParams.new(filterObjects, Enum.RaycastFilterType.Include, maxObjectsAllowed, "Default")
local objectsInSpace = workspace:GetPartsInPart(RPH.RedRegion, params)
for i, v in pairs(objectsInSpace) do
if v == CurrentBox then
PlacingObject = true
CurrentBox.BrickColor = BrickColor.new("Lime green")
else
PlacingObject = false
CurrentBox.BrickColor = BrickColor.new("Really red")
end
end
end)
Also, the script is on the client side.
Any help is appriciated .