Created
February 21, 2017 01:26
-
-
Save spotco/580fbeb3d282d510c1010aff8841f7d0 to your computer and use it in GitHub Desktop.
CreateAnchors.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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