Encladeus
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 3839 |
|
|
| 20 Mar 2016 02:52 AM |
if hit.Parent.Name == 'Bullet' or hit.Name == 'Bullet' then do stuff that isn't important elseif not hit.Parent.Name == 'Bullet' or not hit.Name == 'Bullet' then return end
I'm trying to do a filter where if a projectile named 'Bullet' hits it, it will destroy it immediately. But if anything else touched it nothing will happen.
This SHOULDN'T happen at all, but when I walk my character through the brick it deletes my character... WHAT? |
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 20 Mar 2016 02:55 AM |
| Why would you need the elseif? |
|
|
| Report Abuse |
|
|
R4G3N4R0K
|
  |
| Joined: 16 Feb 2016 |
| Total Posts: 74 |
|
|
| 20 Mar 2016 02:56 AM |
| There's must be mistake in your script? :/ |
|
|
| Report Abuse |
|
|
Encladeus
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 3839 |
|
|
| 20 Mar 2016 02:56 AM |
| I'll be expanding more functions for that later. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 20 Mar 2016 02:59 AM |
if hit.Parent.Name == 'Bullet' or hit.Name == 'Bullet' then do stuff that isn't important else return end
|
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 20 Mar 2016 02:59 AM |
| Can u put the script to where it destroys something? I need to see specifically what it destorys |
|
|
| Report Abuse |
|
|
Encladeus
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 3839 |
|
|
| 20 Mar 2016 03:04 AM |
| TBH, The script was working perfectly yesterday when I saved it BOTH on ROBLOX and twice on files in the computer. Now none of them work properly and I've tried every single save. I've restarted Studio, the computer over and over and there is still no error in output. |
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 20 Mar 2016 03:06 AM |
| A lot of things can go wrong with a script especially if you don't full proof it like yours many random errors or unexpected scenarios can come up to not produce the result that your looking for |
|
|
| Report Abuse |
|
|
Draekin
|
  |
| Joined: 25 Jan 2012 |
| Total Posts: 208 |
|
|
| 20 Mar 2016 03:09 AM |
| dude your script just became stupid |
|
|
| Report Abuse |
|
|