From 9508a004d0da9edbb2267e90d305dcb17687230d Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Tue, 2 Apr 2019 17:47:51 -0400 Subject: [PATCH] fix posLimit(pos) to process and return a position table --- pos.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pos.lua b/pos.lua index 59eae94..e97e4fc 100644 --- a/pos.lua +++ b/pos.lua @@ -130,7 +130,11 @@ function areas:getPos(playerName) end local function posLimit(pos) - return math.max(math.min(p, 31000), -31000) + return { + x = math.max(math.min(pos.x, 31000), -31000) + y = math.max(math.min(pos.y, 31000), -31000) + z = math.max(math.min(pos.z, 31000), -31000) + } end function areas:setPos1(playerName, pos)