Need help with creating a fully working button

local minCornerPos = Vector3.new(-10,-10,-10)
local maxCornerPos = Vector3.new(10,10,10)

local function isCharacterInArea(character)
local pos = character.HumanoidRootPart.Position

  if minCornerPos.X < pos.X < maxCornerPos.X then
    if minCornerPos.Y < pos.Y < maxCornerPos.Y then
      if minCornerPos.Z < pos.Z < maxCornerPos.Z then
      print("Character is in zone")
      return true
      end
      end
    end
end
1 Like

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