Region3 help youknow how when you enter the region you make something happen how do you make something happen when you exit?

So this may seem simple but I cant figure it out so you know you can make something happen while they are in the region how do you make it so when you exit something happens. For example game the iconic fencing game on Roblox when you enter you can do damage to others when you exit you cant.

local region  =,1,1),,10,10))

local part"Part", game.Workspace)
part.Anchored =  true
part.Size = region.Size
part.CFrame = region.CFrame
part.CanCollide = false
part.Transparency = 0.6
part.Color =, 0, 0)
while true do  
	local partsInRegion =  workspace:FindPartsInRegion3(region, part, 1000)
	for i, v in pairs(partsInRegion) do
		if v.Parent:FindFirstChild("Humanoid") then
			print("Player in region", v.Parent)
			game.ReplicatedStorage.ClassicSword.Parent = game.StarterPack

BTW I’m making sword go to replicated storage when exited region3.

1 Like

I would recommend using ZonePlus for this, it’s pretty simple.

local Zone = require(script.Zone)
local myZone = Zone.fromRegion(,, 20, 20))

	print(player.Name.." entered the region")

	print(player.Name.." left the region")
1 Like

Same, but I would recommend people trying to help the OP’s main issue here, that is trying to help them solving the problems in their script so that they can get a better gist of how the general idea works.

i am busy now so i cant really help much currently.

1 Like

Took me a while to understand Zone Plus but it worked! Thanks.

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