Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create a new model
- local model = Instance.new("Model")
- model.Name = "RegeneratedModel"
- model.Parent = workspace
- -- Create parts and position them
- local part1 = Instance.new("Part")
- part1.Name = "Part1"
- part1.Size = Vector3.new(2, 2, 2)
- part1.Position = Vector3.new(0, 0, 0)
- part1.Parent = model
- local part2 = Instance.new("Part")
- part2.Name = "Part2"
- part2.Size = Vector3.new(2, 2, 2)
- part2.Position = Vector3.new(4, 0, 0)
- part2.Parent = model
- -- Create a new script to make the model move
- local script = Instance.new("Script")
- script.Parent = model
- script.Source = [[
- local part1 = script.Parent.Part1
- local part2 = script.Parent.Part2
- while true do
- part1.Position = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
- part2.Position = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
- wait(1)
- end
- ]]
Advertisement
Add Comment
Please, Sign In to add comment