Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make a buy model script work?

Asked by 10 years ago

Okay so I have been trying to make this car model I have made work as a buy able model to get for real money. The car is called the Tesla, my only problem is when I buy the model it spawns broken and out of shape. please help. Here is the script:

01-------------------------------------------------------------------------------------------------------------------------
02 
03model = script.Parent.Parent.Parent.Tesla --Item name
04Upgradecost = 1000  --Change cost to upgrade
05-------------------------------------------------------------------------------------------------------------------------
06 
07upgradeStuff = model:clone(Upgrader1)--
08 
09 
10model:remove() --remove the ingame model. We saved a clone for later.
11 
12local ting = 0 --debouncer
13 
14function onTouched(hit)
15    if ting == 0 then --check for debounce
View all 39 lines...

Here are the links for proof:

C:\Users\Solrac\Documents\ROBLOX\Game Stuff\Astura with buy model button at start.png

C:\Users\Solrac\Documents\ROBLOX\Game Stuff\Astura afterwards (after bought using money).PNG

0
Okay I think it was because I forgot to weld the car parts ( I only grouped them ) well thanks anyway and I will accept both answers STICKYBUN10 19 — 10y
0
No wait I did have to add a function to my script, anyway thanks it works now :) STICKYBUN10 19 — 10y

2 answers

Log in to vote
1
Answered by
woodengop 1134 Moderation Voter
10 years ago

You can use the MakeJoints Method, Now to add it to your script.

1--> line 27-33
2 upgradeStuff.Parent = script.Parent.Parent.Parent --put the upgrade into the game
3upgrade:MakeJoints()
4script.Parent.Parent:remove() -- remove the upgrade button (in case of one-upgrade only)
5end
6end
7end
Ad
Log in to vote
5
Answered by
xuefei123 214 Moderation Voter
10 years ago

MakeJoints() Maybe

1model:MakeJoints()

Instead of clone() may work, or anchor the things and weld them possibly

0
Okay thanks for the answer, although it was a very short answer, oh well I will try it STICKYBUN10 19 — 10y
0
Can you accept my answer plz? xuefei123 214 — 9y

Answer this question