If Statement Not Running

Hello DevFourm, I am making a prototype of a system I’ve wanted to make. Right now, I have 2 buttons labelled “Sparkles” and “Fire”. I have a LocalScript in these buttons to fire the button’s name over a RemoteEvent. I then have a ServerScript that once the event was fired, checks to see which button fired it by checking the name that fired over.

I have 2 if statements to check the name of that fired. The first one works, but the second doesn’t.

Heres the SevrerScript:


(I can’t paste the full script as it’s too long but the “Fire” if statement is the one not running)

Thank You :slight_smile:

:Connect() instead of :Once() or else it will just get the first one to be fired, and it will ignore the second one

You need another end between your if statements. Your second if statement is technically in your first one. Even better, change your second if to an elseif to the first if statement. I assume this is what you want since button can’t be sparkles and fire.

Wow, I didn’t see that lol :laughing: Thanks for the Help!

mind tagging it as a solution if it worked? No problem

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.