How can I see if a player is within a zone?

The zone would be inside a building, and essentially while they’re in it I want a color correction for lighting, but while they’re out of it, I want it to go to another color correction. Any tips on how I could go about this?

Correct me if I’m wrong somebody, but I believe you could use Region3 for this.

2 Likes

You could also use a script that just detects when someone touches a hitbox around the building:

hitbox.Touched:Connect(function()
	--change lighting
end)

hitbox.TouchEnded:Connect(function()
	--Reset lighting
end)

*untested

1 Like

Region3’s methods are deprecated. GetPartBoundsInBox() would be the most accurate measure to take I believe.

2 Likes

Didn’t know Region3 was deprecated, thanks for letting me know!

1 Like

Region3 is deprecated? Just use a size Vector3 and a CFrame then (with a bit of math).

:clap: there’s literally nothing marked as “Deprecated” on the docs :clap:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.