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 » Scripters
Home Search
 

Re: Regen script doesnt work?

Previous Thread :: Next Thread 
Arkrane is not online. Arkrane
Joined: 25 Mar 2012
Total Posts: 2379
07 Jul 2016 05:50 PM
Need help, trying to regen a boat, but whenever I test it, it never regens.

local Boat = Workspace.Boat3:Clone()
local WaitTime = 10
local Debounce = true

script.Parent.ClickDetector.MouseClick:connect(function()
if Debounce then
Debounce = false
script.Parent.BrickColor = BrickColor.new("Bright red")
Boat.Parent = Workspace
Boat = Boat:Clone()
wait(WaitTime)
Debounce = true
script.Parent.BrickColor = BrickColor.new("Bright yellow")
end
end)


Report Abuse
Arkrane is not online. Arkrane
Joined: 25 Mar 2012
Total Posts: 2379
07 Jul 2016 06:01 PM
bump


Report Abuse
Arkrane is not online. Arkrane
Joined: 25 Mar 2012
Total Posts: 2379
07 Jul 2016 06:41 PM
b2


Report Abuse
D4rkly is not online. D4rkly
Joined: 11 Oct 2009
Total Posts: 1198
07 Jul 2016 06:50 PM
Boat_Clone = Boat:Clone()




~D4rkly
Report Abuse
D4rkly is not online. D4rkly
Joined: 11 Oct 2009
Total Posts: 1198
07 Jul 2016 06:50 PM
Rather,
Boat_Clone = Boat:Clone()
Boat_Clone = Workspace


~D4rkly
Report Abuse
D4rkly is not online. D4rkly
Joined: 11 Oct 2009
Total Posts: 1198
07 Jul 2016 06:52 PM
Gah I need to read.

This should work.

local Boat = Workspace.Boat3:Clone()
local WaitTime = 10
local Debounce = true

script.Parent.ClickDetector.MouseClick:connect(function()
if Debounce then
Debounce = false
script.Parent.BrickColor = BrickColor.new("Bright red")
Boat_Clone = Boat
Boat_Clone.Parent = game.Workspace

wait(WaitTime)
Debounce = true
script.Parent.BrickColor = BrickColor.new("Bright yellow")
end
end)


~D4rkly
Report Abuse
Arkrane is not online. Arkrane
Joined: 25 Mar 2012
Total Posts: 2379
07 Jul 2016 06:55 PM
Just a question, would I put the boat in the regen model or does it just stay in workspace?


Report Abuse
D4rkly is not online. D4rkly
Joined: 11 Oct 2009
Total Posts: 1198
07 Jul 2016 06:55 PM
OK. 100% works now.





local Boat = Workspace.Boat
local WaitTime = 10
local Debounce = true

script.Parent.ClickDetector.MouseClick:connect(function()
if Debounce then
Debounce = false
script.Parent.BrickColor = BrickColor.new("Bright red")
Boat_Clone = Boat:Clone()
Boat_Clone.Parent = game.Workspace

wait(WaitTime)
Debounce = true
script.Parent.BrickColor = BrickColor.new("Bright yellow")
end
end)


~D4rkly
Report Abuse
D4rkly is not online. D4rkly
Joined: 11 Oct 2009
Total Posts: 1198
07 Jul 2016 06:58 PM
Well, local Boat = Workspace.Boat

So it searches for the model to be cloned in Workspace.

If you change the parent of the boat, change where it should be searched for.

ex.
local Boat = Workspace.Boats.Boat


~D4rkly
Report Abuse
Arkrane is not online. Arkrane
Joined: 25 Mar 2012
Total Posts: 2379
07 Jul 2016 06:58 PM
Thanks D4rkly, it works. But for some reason, it regens the wrong boat.


Report Abuse
Arkrane is not online. Arkrane
Joined: 25 Mar 2012
Total Posts: 2379
07 Jul 2016 06:58 PM
Nevermind, just saw your last post. lol. Works great, thanks.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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