Advertisement
brokenVectors

PlotUtil

Sep 1st, 2020
1,502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local repStorage = game:GetService('ReplicatedStorage')
  2. local PT_DIRECTORY = repStorage:WaitForChild('PT_DIRECTORY')
  3. local module = {}
  4. function module:CreateGraph(name)
  5.     local graphDir = Instance.new("Folder")
  6.     graphDir.Name = name
  7.     graphDir.Parent = PT_DIRECTORY
  8.     return graphDir
  9. end
  10. function module:NewPoint(graphDir, x, y)
  11.     local obj = Instance.new("Vector3Value")
  12.     obj.Value = Vector3.new(x, -y, 0)
  13.     obj.Name = #graphDir:GetChildren() + 1
  14.     obj.Parent = graphDir
  15.    
  16.     return obj
  17. end
  18. function module:GetPoint(graphDir, num)
  19.     return graphDir:FindFirstChild(tostring(num))
  20. end
  21. return module
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement