|
| 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 |
|
|
|
| 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 |
|
|
| |
|