#Remote event in an if.

14 messages · Page 1 of 1 (latest)

stark nexus
#

Is there any possible way to receive a remote event in an if?
Example:

if game.ReplicatedStorage.RemoteEvent.OnServerEvent then
    print("Hello World")
end```
I know there is `game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()` but that's not what I'm looking for.
supple tide
#

why tho

stark nexus
# supple tide why tho

cuz when i do function in a loop to break it, it says break statement must be in a loop

brazen thunder
stark nexus
brazen thunder
#

no, please explain

#

i think you have misunderstood something about the 'break' keyword

stark nexus
# brazen thunder i think you have misunderstood something about the 'break' keyword

im using a for loop, which i copy and pasted from the web, i'm making it so that when an event is fired the loop is activated and if another event is fired the loop is broken but when i put the remotevent function inside the loop it gives me an error and says break statement must be in a loop (i have no idea how for loops function :/ so i'm just trying to make something out of it)

stark nexus
#

thx a lot