|
| 17 Mar 2015 01:18 PM |
Okay so, I have my car in the server storage and my main script in ServerScriptService, and it won't respawn due to an error that occurs with this section.
function createCars() for _, object in pairs(game.ServerStorage:GetChildren()) do local carCopy = object:Clone() carCopy.Parent = game.Workspace carCopy:MakeJoints() end end
The error message is as follows: MakeJoints is not a valid member of Configuration
When I remove the MakeJoints() line of code, my cars spawn. But they then fall apart.
Any ideas? |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 17 Mar 2015 01:19 PM |
function createCars() for _, object in pairs(game.ServerStorage:GetChildren()) do local carCopy = object:Clone() carCopy.Parent = game.Workspace if carCopy:IsA("Model") then carCopy:MakeJoints() end end end |
|
|
| Report Abuse |
|
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 17 Mar 2015 01:19 PM |
That clones everything in ServerStorage, not just your car models.
try:
for _, object in pairs(game.ServerStorage:GetChildren()) do
if object:IsA("Model") then |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 17 Mar 2015 01:20 PM |
MakeJoints only works on models, you are cloning everything inside of ServerStorage, and apparently there is a Configuration object there.
What I did should fix it completely. |
|
|
| Report Abuse |
|
|
kert109
|
  |
| Joined: 31 Dec 2009 |
| Total Posts: 681 |
|
|
| 17 Mar 2015 01:23 PM |
MakeJoints is a method for the object "Model."
Make sure the car is actually welded.
And for some extra info: Try to use Motors (the object, not the surface) rather then plain Welds, since motors do not glitch like welds do. (You use them the same exact way. Weld.C0 is the same as Motor.C0.) |
|
|
| Report Abuse |
|
|
| |
|