Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Vector3 = {
- new = function(n1,n2,n3)
- local p = {}
- p.x, p.y, p.z = n1,n2,n3
- setmetatable(p, {
- __tostring = function()
- return p.x..","..p.y..","..p.z
- end;
- __index = function(self,func, val, val2, val3)
- if func == "SetX" then
- return self.new(val,self.y,self.z)
- elseif func == "new" then
- print(val1, val2, val3)
- end
- end
- }
- )
- return p
- end;
- }
- local firstv3 = Vector3.new(1,2,4)
- print( firstv3:SetX(20) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement