Skip to content

Instantly share code, notes, and snippets.

@spotco
Created February 21, 2017 01:26
Show Gist options
  • Select an option

  • Save spotco/580fbeb3d282d510c1010aff8841f7d0 to your computer and use it in GitHub Desktop.

Select an option

Save spotco/580fbeb3d282d510c1010aff8841f7d0 to your computer and use it in GitHub Desktop.
CreateAnchors.lua
local center = game.Workspace.GameEnvironment.GameEnvironmentCenter.Position
local magnitude = (Vector3.new(275.532, 397.398, -216.867) - Vector3.new(214.636, 397.398, -224.061)).magnitude + 1.5
local y_offset = 1.91
for i=0,85 do
local theta = (i / 25.0) * math.pi * 2
local x = math.sin(theta)
local y = math.cos(theta)
local itr = Instance.new("Part")
itr.Size = Vector3.new(0.2,0.2,0.2)
itr.CanCollide = false
itr.Anchored = true
itr.Name = "Anchor"
itr.Position = center + (Vector3.new(x,0,y) * magnitude) + Vector3.new(0,y_offset,0)
itr.Parent = game.Workspace.GameEnvironment.Crowd.Anchors
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment