generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: regen ill pay

Previous Thread :: Next Thread 
bobbyisawesome is not online. bobbyisawesome
Joined: 04 Jan 2009
Total Posts: 1190
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
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
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
bobbyisawesome is not online. bobbyisawesome
Joined: 04 Jan 2009
Total Posts: 1190
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 is not online. 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
canada1232111 is not online. canada1232111
Joined: 16 Jan 2013
Total Posts: 863
02 Jul 2013 06:50 PM
This is scripting helpers, not lmad.
Report Abuse
ToboboT is not online. 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
bobbyisawesome is not online. bobbyisawesome
Joined: 04 Jan 2009
Total Posts: 1190
03 Jul 2013 11:31 AM
the regen script still wont clone a new car when pressed..
Report Abuse
Ulrakid11 is not online. 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
bobbyisawesome is not online. bobbyisawesome
Joined: 04 Jan 2009
Total Posts: 1190
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
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
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
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
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
bobbyisawesome is not online. bobbyisawesome
Joined: 04 Jan 2009
Total Posts: 1190
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
bobbyisawesome is not online. bobbyisawesome
Joined: 04 Jan 2009
Total Posts: 1190
03 Jul 2013 04:29 PM
bump
Report Abuse
Hergest is not online. Hergest
Joined: 17 May 2011
Total Posts: 309
03 Jul 2013 05:00 PM
Bobby, get out. Seriously just get out.
Report Abuse
ToontownROXYA is not online. ToontownROXYA
Joined: 02 Aug 2010
Total Posts: 434
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
ToontownROXYA is not online. ToontownROXYA
Joined: 02 Aug 2010
Total Posts: 434
03 Jul 2013 05:15 PM
What is the name of the car, perfect spelling and capitalization?
Report Abuse
thespirjet is not online. thespirjet
Joined: 19 Oct 2011
Total Posts: 160
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image