|
| 17 Apr 2016 10:33 PM |
local map = game:GetService('ServerStorage'):FindFirstChild('Maps'):GetChildren() local choose = (map[math.random(1, #map)]):clone() choose:MoveTo(Vector3.new(0, 0, 0)) choose.Parent = game.Workspace |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Apr 2016 10:41 PM |
--You dont need to use getservice since serverstorage is already part of the datamodel and findfirstchild is for true or false operations.
local map = game.ServerStorage.Maps:GetChildren() local ranMap = maps[math.random(1,#maps)]:Clone() ranMap.Parent = workspace
--You dont need to use vector3 here. Just drag the map in studio to the place you want it to clone.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
|
| 17 Apr 2016 10:42 PM |
| ^ The Point is, I want to use MoveTo... |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Apr 2016 10:43 PM |
Well then use moveto after all of that.
|
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 10:44 PM |
| Same thing happens: 'MoveTo is not a valid member of Part' |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Apr 2016 10:45 PM |
MoveTo can only be used on a Model
|
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 17 Apr 2016 11:34 PM |
| Assuming its a part, just change the .Position property. |
|
|
| Report Abuse |
|
|