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
 

Re: elseif statement not triggered?

Previous Thread :: Next Thread 
Encladeus is not online. 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 is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
20 Mar 2016 02:55 AM
Why would you need the elseif?
Report Abuse
R4G3N4R0K is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. Draekin
Joined: 25 Jan 2012
Total Posts: 208
20 Mar 2016 03:09 AM
dude your script just became stupid
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