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
 

Why isn't this script working?

Previous Thread :: Next Thread 
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 08:17 PM
function onTouched()
script.Parent:FindFirstChild("Humanoid")
if Humanoid ~= nil then
Humanoid:BreakJoints()
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
25 May 2013 08:20 PM
Humanoids don't have joints to break.
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 08:22 PM
So that means this works:


function onTouched()
script.Parent:FindFirstChild("Humanoid")
if Humanoid ~= nil then
Humanoid.Health = 0
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 08:27 PM
Uhh... hello?
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
25 May 2013 08:28 PM
Yes.
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 08:30 PM
When I test it on visit.rbxl it's not working.
How is that?
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 08:31 PM
The output comes up with nothing when I touch the parent of the script.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
25 May 2013 08:33 PM
function onTouched()
script.Parent:FindFirstChild("Humanoid")--You're trying to find a humoin in the brick you touched.
if Humanoid ~= nil then
Humanoid.Health = 0
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 08:33 PM
SH is sometimes dead :{
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 08:35 PM
That was the script I typed in before :|
It's the EXACT same, why isn't it workin'?
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
25 May 2013 08:40 PM
function onTouched(hit)
hit.Parent:FindFirstChild("Humanoid")
if Humanoid ~= nil then
Humanoid.Health = 0
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 09:00 PM
Output still says nothin' mate.
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
25 May 2013 09:08 PM
function onTouched(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
25 May 2013 09:12 PM
[ Content Deleted ]
Report Abuse
MilkyWay01 is not online. MilkyWay01
Joined: 22 Feb 2010
Total Posts: 1049
25 May 2013 09:13 PM
function onTouched(part)
local a = part.Parent:findFirstChild("Humanoid")
if a ~= nil then
a.Health = 0
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
SharpUserKnifeIV is not online. SharpUserKnifeIV
Joined: 03 Apr 2013
Total Posts: 1398
25 May 2013 09:39 PM
Thanks! I just made a free model!
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