Content deleted content deleted content deleted content deleted content deleted

content deleted content deleted content deleted content deleted content deleted content deleted content deleted

1 Like

You should tell us if theres errors, not just say “it wont work”.

Can you label any errors in the output?

Also, instead of using
Instance.new("Part",parent)
use:
part.Parent = --whatever
in a seperate line

Elaborate what you’re trying to do. Part is finding child humanoid but humanoid isnt a valid child of Workspace, its a child of the player.

content deleted content deleted content deleted content deleted

1 Like
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

4 Likes

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.

Thank you. I was confused about the “while true do”

content deleted content deleted content deleted content deleted

content deleted content deleted content deleted content deleted

workspace is not deprecated. It is a global, actually it is more encouraged to use workspace than game.Workspace since it is faster.

2 Likes

and how would i make it work with FindPartsInRegion3WithWhitelist and detect when a player leaves the region