|
| 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
|
  |
| 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 |
|
|
|
| 23 Jun 2013 01:03 PM |
| Where is s located in the game, and is s the brick name? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|