while true do
wait(0.5)
local partsinregion = workspace:FindPartsInRegion3(region, part, 1000)
local playerFound = {}
for i, part in pairs(partsinregion) do
if part.Parent:FindFirstChild("Humanoid") ~= nil then
print("Player found in region!" .. part.Parent.Name)
playerFound[part.Parent.Name] = true
local playerr1 = part.Parent.Name
local playerr2 = game.Players:FindFirstChild(playerr1)
local frame = playerr2.PlayerGui.Craftinggui.Frame
frame.Craftingtablegui.Visible = true
end
end
end
end
end
COMMUNITY QUESTION
Ik how to find out if a player enters region3. But how do i find out if player has left region3?
1 answer
You could try having a table and inserting the player's name into the table once the player has walked into the region3. and the while loop could also try running through the table containing all players who entered region3 and checking if the person is still in the region3 or if they person is not in the region3.
This discussion is preserved as it was. New answers, comments, and votes are closed.
