Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local workspace = game.Workspace
- local spawnPoint = workspace.Part
- local x = Instance.new("IntValue")
- x.Parent = game.Lighting.Configuration
- x.Name = "Value"
- function spawnBlocks(times)
- for z = 1, times do
- local block = Instance.new("Part")
- block.Parent = workspace
- block.Size = Vector3.new(3, 3, 3)
- block.Position = spawnPoint.Position
- block.Name = x.Value
- wait(0.25)
- end
- end
- function weldTheParts()
- -- Required variables
- local vertices = workspace.Model
- local cube = workspace.alpha
- local cubes = vertices:GetChildren()
- if (cube.Anchored == false) and (cubes.Anchored == false) then
- cube.Anchored = true
- cubes.Anchored = true
- end
- for _,Part in next,vertices:GetChildren() do
- local weld = Instance.new("ManualWeld")
- weld.Part0 = cube
- weld.Part1 = Part
- weld.C0 = CFrame.new()
- weld.C1 = Part.CFrame:inverse() * cube.CFrame
- weld.Parent = cube
- end
- cube.Anchored = false
- cubes.Anchored = false
- end
- weldTheParts()
- spawnBlocks(500)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement