Skip to content

Commit

Permalink
teleport: Fixed Z coordinate not accepting non-relative coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
NiLSPACE committed Jun 17, 2015
1 parent 1be44bd commit cbf3280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teleport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function HandleTPCommand(a_Split, a_Player)
Y = select(2, pcall(setfenv(Function, {})));
end

local Z = a_Split[4];
local Z = tonumber(a_Split[4]);
Function = loadstring(a_Split[4]:gsub("~", "return " .. a_Player:GetPosZ() .. "+0"));
if Function then
-- Execute the function in a save environment, and get the second return value.
Expand Down

0 comments on commit cbf3280

Please sign in to comment.