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
 

This would not work...

Previous Thread :: Next Thread 
daruto3 is not online. daruto3
Joined: 02 Dec 2008
Total Posts: 8545
17 Aug 2012 12:00 AM
texture = "http://www.roblox.com/Item.aspx?ID=TSHIRTIDHURR"

function onTouch(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if (humanoid ~=nil) then
if human.Parent.Torso.roblox.Texture == texture then
humanoid.Health = 0
end
end
end

script.Parent.Touched:connect(onTouch)



I want it so when you're wearing the T-Shirt the lava doesn't kill you but I think I mixed that up...
Report Abuse
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
17 Aug 2012 12:05 AM
Nope.
You made it so that if you are wearing the T-shirt, then it kills you.
-.-
Report Abuse
daruto3 is not online. daruto3
Joined: 02 Dec 2008
Total Posts: 8545
17 Aug 2012 12:06 AM
I just tested it


It doesn't even kill you with the T-shirt on
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
17 Aug 2012 12:07 AM
script.Parent.Touched:connect(function()
local humanoid = part.Parent:findFirstChild("Humanoid")
if humanoid ~=nil then
if human.Parent.Torso.roblox.Texture ~= texture then
humanoid.Health = 0
end
end
end)

Now it'll kill anyone not wearing the t-shirt.
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
17 Aug 2012 12:09 AM
Wait...

script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if humanoid ~=nil then
local human = part.parent
if human.Parent.Torso.roblox.Texture ~= texture then
humanoid.Health = 0
end
end
end)

Also, are you sure "roblox" is the t-shirt's default name?
Report Abuse
daruto3 is not online. daruto3
Joined: 02 Dec 2008
Total Posts: 8545
17 Aug 2012 12:10 AM
Oh crap
Report Abuse
daruto3 is not online. daruto3
Joined: 02 Dec 2008
Total Posts: 8545
17 Aug 2012 12:13 AM
Its still not working...

texture = "http://www.roblox.com/Item.aspx?ID=70878535"

script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if humanoid ~=nil then
local human = part.parent
if human.Parent.Torso.Fat.Texture ~= texture then
humanoid.Health = 0
end
end
end)
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
17 Aug 2012 12:20 AM
Fat? That isn't the default t-shirt's name either. Also capitalize Parent in local human, I forgot to do that myself. Posting the output would help too.
Report Abuse
daruto3 is not online. daruto3
Joined: 02 Dec 2008
Total Posts: 8545
17 Aug 2012 12:21 AM
i no understand, me nooby scripter...



Making this lava script was the challenge of the day
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