Help with Proximity sound and effect

So basically, I’m trying to make a sound and effect (a gui btw) play when a certain humanoid is near. Problem is, I have no idea.

Any help?

1 Like

Do you want to know how to achieve this?

Well, yeah. Srry I didn’t specify I only said “any help?”

Do you know how to code at all?

Mediocre.
Not a pro at it but I understand most of it

From what I understand you want to make a sound and an effect when a player comes near somewhere?

Yeah. More specifically a certain humanoid (if that’s possible)

Then maybe use region3 or a more accessible option is to make a cylinder or a part attached or anchored to wherever place you want and make a script that, whenever the part gets touched your sounds and effect will work.

sounds like a good idea. I’ll try that now.

1 Like

You could use Magnitude. Basically it gets the distance between 2 positions.

Example
local humanoid = character.HumanoidRootPart
local partWithSound = workspace.PartWithSound

local maxDistance = 50

if (humanoid.Position - partWithSound.Position).Magnitude <= maxDistance then
    -- Do stuff
end

I think he might mean like areas and also magnitude checks once if I’m not wrong, unless you put it in a loop.

1 Like