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: can somebody help me debug this?

Previous Thread :: Next Thread 
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 10:21 AM
function gateDestroyed()
while script.Parent.Humanoid.Health == 0 do
script.Parent.Left Arm.Anchored == nil
script.Parent.Head.Anchored == nil
script.Parent.Torso.Anchored == nil
script.Parent.Right Leg.Anchored == nil
script.Parent.Right Arm.Anchored == nil
script.Parent.Left Leg.Anchored == nil
end
end

function(gateDestroyed)
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
23 Apr 2013 10:29 AM
function gateDestroyed()
while script.Parent.Humanoid.Health == 0 do
wait()
script.Parent["Left Arm"].Anchored = false
script.Parent.Head.Anchored = false
script.Parent.Torso.Anchored = false
script.Parent["Right Leg"].Anchored = false
script.Parent["Right Arm"].Anchored = false
script.Parent["Left Leg"].Anchored = false
end
end

gateDestroyed()

Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 10:32 AM
@Desperian
Still wont work, even though no error is in the output anymore.
Also, why did you put a wait() there?
Report Abuse
eletrowiz is not online. eletrowiz
Joined: 08 Dec 2008
Total Posts: 12438
23 Apr 2013 10:40 AM
The wait() is to prevent an infinite loop, and the game crashing.

-={3137}=-
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 10:54 AM
k, that makes sense, but why doesnt it unanchor when its health is gone?
Report Abuse
eletrowiz is not online. eletrowiz
Joined: 08 Dec 2008
Total Posts: 12438
23 Apr 2013 11:02 AM
I don't quite know.

Try to do this.

function gateDestroyed()
while script.Parent.Humanoid.Health <= 0 do
wait()
script.Parent["Left Arm"].Anchored = false
script.Parent.Head.Anchored = false
script.Parent.Torso.Anchored = false
script.Parent["Right Leg"].Anchored = false
script.Parent["Right Arm"].Anchored = false
script.Parent["Left Leg"].Anchored = false
end
end

gateDestroyed()

-={3137}=-
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 11:06 AM
None of these scripts are working.
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
23 Apr 2013 11:08 AM
are u sure u have connected the function or called it?
Report Abuse
eletrowiz is not online. eletrowiz
Joined: 08 Dec 2008
Total Posts: 12438
23 Apr 2013 11:08 AM
What exactly are you attempting to do?

-={3137}=-
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
23 Apr 2013 11:08 AM
Then the likely hood is that the parts you're unanchoring are welded to something or another. When trying the script, check in the explorer and see if the 'Anchored' property is ticked for the item that's meant to be unanchored.
Report Abuse
eletrowiz is not online. eletrowiz
Joined: 08 Dec 2008
Total Posts: 12438
23 Apr 2013 11:10 AM
@Des
If the humanoid already has 0 health it should break joints.
Not quite sure what OP is trying to do though...

-={3137}=-
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 11:10 AM
@desperian
I did. It remains anchored.
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 11:11 AM
@electro
make it break the joints.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
23 Apr 2013 11:12 AM
@Ele,

Mmm, it'd be nice if he gave us some context.
Report Abuse
eletrowiz is not online. eletrowiz
Joined: 08 Dec 2008
Total Posts: 12438
23 Apr 2013 11:16 AM
If you are trying to break the joints...

function gateDestroyed()
while script.Parent.Humanoid.Health <= 0 do
wait()
script.Parent:BreakJoints()
end
end

gateDestroyed()


-={3137}=-
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 11:18 AM
@electro
It still isnt working.
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 11:35 AM
bump
Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
23 Apr 2013 11:40 AM
i saw the fault, this shoudl be working:

don't quite know.

Try to do this.

function gateDestroyed()
while script.Parent.Humanoid.Health == 0 do
script.Parent["Left Arm"].Anchored = false
script.Parent.Head.Anchored = false
script.Parent.Torso.Anchored = false
script.Parent["Right Leg"].Anchored = false
script.Parent["Right Arm"].Anchored = false
script.Parent["Left Leg"].Anchored = false
wait(3)
end
end

----------------------however you only yet need to make a connector for the function, i have no idea what to do for when a part is destroyed.
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 11:44 AM
nothing is working.
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 11:57 AM
help D:
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 12:02 PM
:<
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
23 Apr 2013 12:04 PM
Something like this may be more appropriate for the situation, however i'm not 100% sure what your trying to do.

script.Parent.Humanoid.Died:connect(function() -- runs when humanoid dies.
for i,v in pairs(script.Parent:GetChildren()) do --get everything inside script.Parent
if v:IsA("Part") then -- check if its a part
v.Anchored = false -- unanchor if it is a part
end
end
end
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 12:08 PM
@Mrgames
That didn't work either...

Heres the deal: I want the model (gate) to break apart like a player does when the health is gone. Simple as that.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
23 Apr 2013 12:11 PM
This might fix it, since the head and torso have a weld connecting them.

script.Parent.Humanoid.Died:connect(function()
script.Parent:BreakJoints()
for i,v in pairs(script.Parent:GetChildren()) do
if v:IsA("Part") then
v.Anchored = false
end
end
end
Report Abuse
RainbowDash101 is not online. RainbowDash101
Joined: 31 May 2011
Total Posts: 17762
23 Apr 2013 12:12 PM
nothing is working.
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