|
| 02 Jul 2013 04:29 PM |
| Ill pay anyone that will make a regen button that regens a new car instead of taking the old one. Thanks |
|
|
| Report Abuse |
|
|
|
| 02 Jul 2013 04:34 PM |
script.Parent.Touched:connect(function(Part) if Part.Parent:FindFirstChild("Humanoid") then --makes sure that a player touched it local Clone = Workspace.Car:Clone() Clone.Parent = Workspace end end)
Replace variables as necessary. |
|
|
| Report Abuse |
|
|
|
| 02 Jul 2013 06:47 PM |
| what would the variables be? idk anything about scripting i cant seem to get how to do it ive tried so many times. |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
|
| 02 Jul 2013 06:50 PM |
Cut and paste your car into lighting then do the other guy's script just change the local car = game.Lighting.CARNAME:clone(game.Workspace)
and remove the other guys 3 to last line. |
|
|
| Report Abuse |
|
|
|
| 02 Jul 2013 06:50 PM |
| This is scripting helpers, not lmad. |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
|
| 02 Jul 2013 06:51 PM |
script.Parent.Touched:connect(function(Part) if Part.Parent:FindFirstChild("Humanoid") then Clone = Workspace.CARNAME:Clone(game.Workspace) end end)
Now you can edit the variable Clone whenever |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 11:31 AM |
| the regen script still wont clone a new car when pressed.. |
|
|
| Report Abuse |
|
|
Ulrakid11
|
  |
| Joined: 31 Dec 2010 |
| Total Posts: 1587 |
|
|
| 03 Jul 2013 11:38 AM |
Bobby, use the wiki unless you're under 10, it wasn't designed for young children.
In the wiki go to tutorials then go to scripting tutorials. Start with the introduction series and then take it slowly from there. Take your time to understand fully each article, and experiment on studio before continuing. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 11:57 AM |
| ok im trying through lua learners. Im 16 but i still cant wrap my head around stuff in wiki but lua learners is starting to help me on basics :) |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 12:02 PM |
--Put a copy of the vehicle into lighting AFTER you have it where you want it.
Name = "" --Put the name of the vehicle inside the quotes
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then v = game.Lighting:FindFirstChild(Name):clone() v.Parent = game.Workspace end end) |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 12:05 PM |
--If you want there to be a waiting period, then you would do:
--Put a copy of the vehicle into lighting AFTER you have it where you want it.
Working = false Waittime = --Put the time you'd like to wait before regening the next vehicle here Name = "" --Put the name of the vehicle inside the quotes
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and Working == false then working = true v = game.Lighting:FindFirstChild(Name):clone() v.Parent = game.Workspace wait(Waittime) working = false end end) |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 03:45 PM |
| still isnt working...:/ maybe if someone wants to make the regen for it? the car is one my friend built so its 3rd in my models. Its called really good car. If someone will make a regen button for it thatd be cool also :) because none of these scripts are working really... |
|
|
| Report Abuse |
|
|
| |
|
Hergest
|
  |
| Joined: 17 May 2011 |
| Total Posts: 309 |
|
|
| 03 Jul 2013 05:00 PM |
| Bobby, get out. Seriously just get out. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 05:13 PM |
... Wow, apparently people these days cannot explain things thoroughly. Paste this script into the regen button(part).
Here: --[[THESE ARE THE VARIABLES]] regenitem = game.Workspace.Part -- Change this to the thing you are regenerating. regentime = 2 -- Change this to the time you want it to take for it to regen. prevcolor = script.Parent.BrickColor --Don't change this --[[THIS IS THE SCRIPT]]
script.Parent.Touched:connect(function(hit) script.Parent.BrickColor = BrickColor.new("Really black") local newregen = regenitem:Clone() regenitem:destroy() newregen.Parent = game.Workspace newregen:MakeJoints() wait(2) script.Parent.BrickColor = prevcolor end) |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 05:15 PM |
| What is the name of the car, perfect spelling and capitalization? |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 05:36 PM |
| Wow. Why don't you just put a cart in lighting where you want it to be, then just clone the one in lighting... that would be the easy thing to do |
|
|
| Report Abuse |
|
|