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 button help.

Previous Thread :: Next Thread 
BIGTABLESPOON is not online. BIGTABLESPOON
Joined: 16 Apr 2016
Total Posts: 124
21 Jan 2017 09:50 AM
How do I make a plane regen? With a button. Please help me with this, thanks!
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
21 Jan 2017 09:58 AM
depends what kind of button it is.
gui or brick.
Report Abuse
BIGTABLESPOON is not online. BIGTABLESPOON
Joined: 16 Apr 2016
Total Posts: 124
21 Jan 2017 10:00 AM
Brick
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
21 Jan 2017 10:01 AM
clicking brick or touched brick.
Report Abuse
BIGTABLESPOON is not online. BIGTABLESPOON
Joined: 16 Apr 2016
Total Posts: 124
21 Jan 2017 10:03 AM
Touched, when you walk over it.
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
21 Jan 2017 10:11 AM
use the touchedEvent.

put the script under the brick, doing so, allows you to call the parent of the script, a brick.

so, brick = script.Parent

then you will want to use the roblox part api, and inside that api there is a function called TouchedEvent.
Report Abuse
robloxman303030 is not online. robloxman303030
Joined: 24 Oct 2012
Total Posts: 171
21 Jan 2017 10:11 AM
local plane = game.Workspace.plane --change this to ur plane name
local enabled = true

function onTouched(hit)

if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
local copy = plane:clone()
plane:remove()
script.Disabled = true
wait(4) --regen time
copy.Parent = workspace
copy.Position = Vector3.new(-179.17, 0.5, -112.89) --position it regens at
script.Disabled = false

end
end


script.Parent.Touched:connect(onTouched)
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
21 Jan 2017 10:18 AM
i do not think he understands position, but whatever.
providing code does not help anyone :P
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
21 Jan 2017 10:19 AM
also, if you disable a script, ya cannot renable it at least inside the script.
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
21 Jan 2017 10:21 AM
Scott, don't you think it's a little far fetched to say he doesn't understand position?
Report Abuse
BIGTABLESPOON is not online. BIGTABLESPOON
Joined: 16 Apr 2016
Total Posts: 124
21 Jan 2017 10:22 AM
So it ###### the tools in it, and the plane, in the exact position?
Report Abuse
BIGTABLESPOON is not online. BIGTABLESPOON
Joined: 16 Apr 2016
Total Posts: 124
21 Jan 2017 10:23 AM
What about a GUI???
Report Abuse
robloxman303030 is not online. robloxman303030
Joined: 24 Oct 2012
Total Posts: 171
21 Jan 2017 10:46 AM
put the code in a local script inside a textbutton


local plane = game.Workspace.plane
local p = game.Players.LocalPlayer
button = script.Parent

button.MouseButton1Click:connect(function()

local copy = plane:clone()
plane:remove()
script.Disabled = true
wait(4) --regen time
copy.Parent = workspace
copy.Position = Vector3.new(-179.17, 0.5, -112.89) --position it regens at
script.Disabled = false

end)
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