Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 02:11 PM |
So. The model loads perfectly fine. However, when it loads, because it is a vehicle and cannot be anchored, the model falls apart before it is fully loaded. How can I make it so that the model anchors itself until all the parts are loaded. Please edit this script so that it can anchor or something for like 10 seconds and then unanchor after that….(so it does not fall apart):
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local stats = player:FindFirstChild('leaderstats') if not stats then return end
local gold = stats:FindFirstChild('Gold') if not gold then return end
if choice == script.Parent.Ship then if gold.Value >= 30 then game.ServerStorage.Ship:Clone().Parent = game.Workspace gold.Value = gold.Value - 30 end end end)
|
|
|
| Report Abuse |
|
|
| |
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 02:16 PM |
| Ah . I forgot to add that. It is welded fine. When it is in workspace, it moves around perfectly normally. |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 02:19 PM |
| The only part names in the whole model are SmoothBlockModel and MastPart. That is if you want to use the GetChildren to fix it. |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
| |
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
| |
|
djwill619
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 756 |
|
|
| 15 Aug 2014 02:39 PM |
local Clone = game.ServerStorage.Ship:Clone() Clone.Parent = game.Workspace Clone:MakeJoints |
|
|
| Report Abuse |
|
|
djwill619
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 756 |
|
| |
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 02:40 PM |
| Where would I insert that in the script? And what would I delete? |
|
|
| Report Abuse |
|
|
djwill619
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 756 |
|
|
| 15 Aug 2014 02:41 PM |
| Replace game.ServerStorage.Ship:Clone().Parent = game.Workspace with it. |
|
|
| Report Abuse |
|
|
| |
|
djwill619
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 756 |
|
|
| 15 Aug 2014 02:45 PM |
| If you want to anchor the parts use for i, v in pairs(), however I recommend using :MakeJoints() |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 02:53 PM |
| The make joints script line group that you gave me did not work. SOrry to ask but can you make a line of script for the iv pairs thing? |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
| |
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
| |
|
djwill619
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 756 |
|
|
| 15 Aug 2014 03:06 PM |
| How did you use the :MakeJoints()? |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 03:16 PM |
| I just inserted the group of lines you gave me into the script. ANd I removed the line u told me to remove…..Can you copy the original script and just insert what has to be inserted. I am bad with joints. |
|
|
| Report Abuse |
|
|
djwill619
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 756 |
|
|
| 15 Aug 2014 03:20 PM |
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local stats = player:FindFirstChild('leaderstats') if not stats then return end
local gold = stats:FindFirstChild('Gold') if not gold then return end
if choice == script.Parent.Ship then if gold.Value >= 30 then local Clone = game.ServerStorage.Ship:Clone() Clone.Parent = game.Workspace Clone:MakeJoints() gold.Value = gold.Value - 30 end end end) |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 03:29 PM |
| Make joints does not work. I think the only thing that will work is to get all the parts and anchor them for a bit until the model loads and then unanchor. |
|
|
| Report Abuse |
|
|
djwill619
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 756 |
|
|
| 15 Aug 2014 03:52 PM |
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local stats = player:FindFirstChild('leaderstats') if not stats then return end
local gold = stats:FindFirstChild('Gold') if not gold then return end
if choice == script.Parent.Ship then if gold.Value >= 30 then local Clone = game.ServerStorage.Ship:Clone() Clone.Parent = game.Workspace for i, v in pairs(Clone:GetChildren()) do gold.Value = gold.Value - 30 if v.ClassName == "Part" or v.ClassName == "VehicleSeat" v.Anchored = true wait(5) v.Anchored = false Clone:MakeJoints() end end end end end |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
| |
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
| |
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 03:59 PM |
| It has something to do with the local clone. Because that made it not spawn before either. I think it needs to have the original cloning mechanism that I had in it? |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 04:04 PM |
| I added a then but that does not work either. |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 15 Aug 2014 04:08 PM |
Yeah. I tested and now know for a fact that the problem lies with these lines:
local Clone = game.ServerStorage.Ship:Clone() Clone.Parent = game.Workspace
It does not clone into workspace. |
|
|
| Report Abuse |
|
|