Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

making a bomb form local to global?

im trying to make a bomb thing as a tool for a game that im making now i dont seem to make it able to be showed towards other players when it is used the bomb itself has a local script on it to detect if its being used and such but it has to drop and after some seconds explode which should be viewable for the whole server (players ingame) is there anyway to make this possable?

5 comments

1

use a server script instead of a local script

0

there isn't much else that I can help you here, you didn't even include a script

5

Next time please use commas and dots at the end of a sentence

1

Use a RemoteEvent to have the Server handle the Explosion.

0

^^^

1 answer

The problem here is that the client events are not replicating to the server, because of the Roblox client-server model. All of the things you're doing on the client, as in making the bomb, the explosion, they're only going to be seen by the player who made them, because Roblox filters what events other players can see. This is what's called "Filtering Enabled".

Because of this, Roblox games are more secure, as exploiters can only alter what's on their clients, and other players won't see what they're doing; they won't be affected.

But if you want players to be able to do things that other players could see, you would have to use RemoteEvents or RemoteFunctions to let the clients' LocalScripts and the server Scripts to communicate. In your case, that would look like:

  1. Player activates the tool,
  2. LocalScript inside the tool sends a request through a RemoteEvent to the server, saying "a bomb should be created at this position",
  3. Server script receives the request, ideally does some checks to verify that the player can create a bomb, then creates a bomb that everyone can see.

If you had trouble understanding all that, don't fret. Took me a while to understand them myself when I was just beginning, so don't worry if it doesn't make sense immediately. I'd suggest you read this tutorial about the client-server model, then this one about RemoteFunctions and RemoteEvents. Just hang in there, if you really want to learn scripting for multiplayer games, learning these things is necessary.

Hope that helps!

2 comments

1

I'm afraid that Experimental mode was discontinued and Network Filtering is forced on everything following the "accurate studio" update, however you could "get rid" of network filtering by disabling accurate studio in settings

0

Woah, seems I haven't been updated. Hmmm. I'll just remove that part from the answer, I just added it in for funsies anyway. Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.