My Region Can't detect a Player

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want my Region to Detect a Player

  2. What is the issue? Include screenshots / videos if possible!

It does not give an error it just simply does nothing.

This is the script

while wait() do
	
	print("E")
	local detectingPlayers = region:FindPartsInRegion3(regionDetectPart, math.huge)

 
	for i, hit in pairs(detectingPlayers) do

		if hit.Parent:FindFirstChild("Humanoid") then
			print(hit.Parent.Name)
			local plrchar = hit.Parent
			local player = game:GetService("Players"):GetPlayerFromCharacter(plrchar)

			if plrchar:IsA("Player") then
				print(player.Name.. "Yeah")

			end

			if player then
				print("It's a player")
			end
		end


	end
end

It does not detect the player but it detects the object around it for example a Dummy.

Also I’ve used the Module name "RotatedRegion3

I had purposely made a 2 check if the Dummy is a Player, but of them does not work.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Yeah but I can’t seem to find a similar one

Please do tell if you have an Idea about this Code.

I think you mean workspace:FindPartsInRegion3

Also it looks like these functions are broken

You should try to look for other posts that have problems like yours before making a new post

using region:FindPartsInRegion3 is the same as using workspace:FindPartsInRegion3.

it is because I am using a Module that’s why.

But alright I’ll try this workspace:GetPartBoundsInBox and see if it works out

Can you send a link to the module? Or did you make one yourself? I just know that workspace:FindPartsInRegion3 stopped working a few days ago.

this is the Module I’ve used

By the author’s own words, you shouldn’t be using it anymore.

Oh, I see, too bad then.

This was a good module to use since i don’t have a way to get the Exact size of a Part

why are you using Region3? that is outdated, using GetPartsInPart (I think that is how it’s spelled) would be a much better option. :+1:

Try

local detectingPlayers = workspace:FindPartsInRegion3(regionDetectPart, nil,  math.huge)

First of all, I do not understand why you would use regions for detecting a player. I would use a part instead and listen to the Touch and TouchEnded events.

Using regions is quite heavy in terms of performance, since you have to keep checking. Listening to Touch and TouchEnded events is much lighter on your memory usage, since the physics engine will do all the work for you behind the scenes.

Theoretically, you can also use multiple parts at once and/or different shapes.