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: How can a bullet damage a script??

Previous Thread :: Next Thread 
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
28 Feb 2013 06:09 PM
When a player fires the gun at the "Remove Door" button, it breaks the script. Same thing for the shields. It kills a player if they attempt to jump out the window. Is there some kind of script that prevents this? Such as, uh
if obj.Parent then
--Rest of the code

Can someone help? It is a extremely important code i need. Or my game will be a disaster.
Helpers only, please.
-King
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
28 Feb 2013 06:12 PM
The problem is actually with your door or shield either no checking if the part it touches is a person, or doing a check after the object is already removed.

An example touched function should look something like

function onTouch(hit)
if hit and hit.Parent and hit.Parent:findFirstChild("Humanoid") then
--Do stuff
end
end
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
28 Feb 2013 06:17 PM
I'm doomed...
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