Hi this is my script and this wont detect player in region3, idk why …
local point1 = workspace.Point1
local point2 = workspace.Point2
local region = Region3.new(point1.Position,point2.Position)
local players = {}
local part = Instance.new("Part",workspace)
part.Anchored = true
part.CanCollide = false
part.Transparency = 0.3
part.Size = Vector3.new(98.015, 6.703, 8.349)
part.CFrame = region.CFrame
while true do
wait(1)
local partsInRegion = workspace:FindPartsInRegion3(region, part, 1000)
for i, part in pairs (partsInRegion) do
if part.Parent:FindFirstChild("Humanoid") ~= nil then
print('You are in region!: ', part.Parent.Name)
end
end
end
local pos1 = part.Position - (part.Size / 2 + Vector3.new(0,0,0))
local pos2 = part.Position + (part.Size / 2 + Vector3.new(0,50,0))
local region = Region3.new(pos1, pos2)
game:GetService("RunService").Stepped:Connect(function()
for i,v in pairs(workspace:FindPartsInRegion3(region, part, math.huge)) do
if v.Parent:FindFirstChild("Humanoid") then
print('You are in region!: ', v.Parent:FindFirstChild("Humanoid").Parent.Name)
end
end
end)
You need to set the positions. Also play around with the Vector3 value of the region positions. Also better to use .Stepped rather than while true do
It clearly isnt my fault, just dont say it doesnt work, find the problem and tell us whats not working, also your script is poorly written, and most likely from a youtube tutorial. You’re using deprecated functions, like workspace and ,parenthere. Please do not say its nonsense as im trying to help you, and I hope it did help you.
What is part when you have answer in script
You say Part is finding child humanoid but humanoid isnt a valid child of Workspace, its a child of the player when part is character part that hitted region3