Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local DB = require(game.ReplicatedStorage.Database)
  2. local UnitStorage = game.ServerStorage:WaitForChild("Units")
  3. local Spawn = game.Workspace:WaitForChild("Spawner")
  4. local ActiveUnits = {}
  5.  
  6. local function CreateUnit(class,team)
  7.     local NewModel = UnitStorage[class]:Clone()
  8.     NewModel.Name = class
  9.     ActiveUnits[NewModel] = {}
  10.     ActiveUnits[NewModel]["Team"] = team
  11.     NewModel.Parent = game.Workspace
  12.     NewModel:MoveTo(Spawn.Position)
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement