Region3 Script Error

Hello, so I have this Region3 and whenever the character enters is inside the region3 the player should get plus 1k Coins since they are in the region but if they leave the region3 that stops. the issue with my script is that even if the player is not present in the region they will still get plus 1k coins
here is the script

local part = script.Parent-- The region3

--local db = false

local region = Region3.new(part.Position - part.Size/2, part.Position + part.Size/2)-- Formula to get the measurements bottom and top of the region
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
	local character = plr.Character
	if not character or not character.Parent then
		character = plr.CharacterAdded:wait()
	end
while true do 
		wait(1)
		local FindParts = game.Workspace:FindPartsInRegion3(region,part)-- BuiltInFunction to check if anything is inside the Region3
		for i,parts in pairs(FindParts) do-- looping through all objects are present in the region3
			if parts.Name == "RightLowerArm" or "Torso" or "UpperTorso" or "RightHand" or "LeftHand" or "HumanoidRootPart" or "RightLowerLeg" then
				plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 1000 
			print(parts)
				
				local Region3UI = game.StarterGui.Region3
			Region3UI.Enabled = true
			else 
				break
end
				
		end
	end
end)

Lua does not work like this. You need to explicitly define the statements per condition: part.Name == "RightLowerArm" or part.Name == "Torso" or... etc

Because right now if any part exists within FindParts, then it will run that set of conditions which will always be a true statement in the end (since the second condition is or "Torso", which is always going to return “Torso”, which is always considered true).

One more thing, what you’re trying here will ultimately not work, since if you have two players then they can trigger each other’s points progression just by existing within this region. What you should be doing instead is to make one loop and then within FindParts, find out whether a part belongs to a player’s character, and then work your way up to the player to access the leaderstats:

local parent = part.Parent
if parent and parent.ClassName == "Model" then
    local player = game.Players:GetPlayerFromCharacter(parent)
    if player then
        -- add your points to this player
    end
end

^ Make sure to only add the points once per search, since multiple parts exist under a character, you don’t want to be adding points per part you find within FindParts.