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 » Scripters
Home Search
 

Gas script not working?

Previous Thread :: Next Thread 
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
13 May 2016 05:08 PM
while wait(.01) do
local parts = script.Parent:GetTouchingParts()
if parts.Parent then
if parts.Parent:FindFirstChild("Humanoid") then
if parts.Parent:FindFirstChild("Face") then
if not parts.Parent.Face:FindFirstChild("Gas Mask") then
parts.Parent.Humanoid:TakeDamage(1)
end
end
end
end
end

Am I using GetTouchingParts wrong?


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
13 May 2016 05:16 PM
dude just use region 3


Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
13 May 2016 05:17 PM
care to give me a tutorial with getpartsinregion3?


Report Abuse
killerbot29003 is not online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
13 May 2016 05:31 PM
http://wiki.roblox.com/index.php?title=API:Region3


This siggy is copyrighted ©
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
13 May 2016 05:31 PM
Thanks a lot, as if I haven't already looked at it.


Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
13 May 2016 05:32 PM
was that sarcasm?


r+://393244197r+://393244224r+://393244262
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
13 May 2016 05:32 PM
yep


Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
13 May 2016 05:34 PM
does this help?

Region3.new( Vector3.new(1, 1, 1), Vector3.new(9, 9, 9) )


r+://393244197r+://393244224r+://393244262
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
13 May 2016 05:34 PM
I understand it, I just don't know how to make it tell the exact dimensions of my gas.


Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
13 May 2016 05:36 PM
take the position - the size/2 so
position = (3,3,3)
size = (1,1,1)
region3 = vector3(2.5,2.5,2.5), vector3(3.5,3.5,3.5) i think


r+://393244197r+://393244224r+://393244262
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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