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: I think i am doing something wrong with this..

Previous Thread :: Next Thread 
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
03 Nov 2013 12:35 AM
Im trying to make a lava brick(Kills when hit)
I tested but nothing happened when i walked on it

function die(t)
if t then
if t.Parent:FindFirstChild("Humanoid") then
t.Parent:BreakJoints()

end
end
end

script.Parent.Touched:connect(die)
Report Abuse
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
03 Nov 2013 12:36 AM
Forgot to mention im still a noob at scripting..
Report Abuse
poey27 is not online. poey27
Joined: 21 Jun 2008
Total Posts: 469
03 Nov 2013 12:38 AM
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = 0
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
03 Nov 2013 01:05 AM
I tried yours and it didnt work:/
Report Abuse
Conmiro is not online. Conmiro
Joined: 13 Oct 2008
Total Posts: 3393
03 Nov 2013 01:07 AM
Crazy, I tried his and it does work.
Report Abuse
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
03 Nov 2013 01:10 AM
Hm i prob typed something wrong from his..Im trying to get used to the typing part..I shall try copy and paste
Report Abuse
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
03 Nov 2013 01:12 AM
It works:D
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