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?Definitely not!

Previous Thread :: Next Thread 
robloxboy54 is not online. robloxboy54
Joined: 20 Nov 2010
Total Posts: 286
23 Jun 2013 12:55 PM
function onClicked(playerWhoClicked)
s.Anchored=false
end

s=game.Workspace.support
script.Parent.ClickDetector.MouseClick:connect(onClicked)

How would I regen "s" after it is unanchored?
Report Abuse
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
23 Jun 2013 12:58 PM
Why isn't your function argument in your function script? I'm confused...
Report Abuse
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
23 Jun 2013 01:03 PM
Where is s located in the game, and is s the brick name?
Report Abuse
robloxboy54 is not online. robloxboy54
Joined: 20 Nov 2010
Total Posts: 286
23 Jun 2013 01:04 PM
no, s stands for support.
Report Abuse
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
23 Jun 2013 01:04 PM
this isn't going to work.
Report Abuse
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
23 Jun 2013 01:05 PM
OK - you defined 's' after changing the properties of it, which is likely to screw up. You also didn't include the arg in your parenthesis anywhere in your script.
Report Abuse
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
23 Jun 2013 01:08 PM
--let me give it a shot, not entirely sure what youre trying to do though

local s = game.Workspace.support
s.Anchored = false

function onClicked()
clone = s:Clone()
if s.Anchored = true then
clone.Parent = game.Workspace
clone:MakeJoints()
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

--Try this. I didn't test it but tell me if it works and if not, any outputs?
Report Abuse
levi998234 is not online. levi998234
Joined: 28 Jul 2008
Total Posts: 53
23 Jun 2013 01:10 PM
s=game.Workspace.support -- Define variables first
cframe = s.CFrame
regenTime = 5

function onClicked(playerWhoClicked)
local clone = s:Clone()
s.Anchored=false
wait(regenTime)
s:Destroy()
clone.Parent = Workspace
clone.CFrame = cframe
s = clone
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
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