Help with script.RemoteEvent1:FireServer()

hi i want help with some thing it i have fire server in tool but it not local script can anyone help do same thing but with different way to work

script.RemoteEvent1:FireServer()
1 Like

i know my english is not good i am sorry

You wanna fire RemoteEvent in script?

1 Like

yep
it dont work only in local script

You can do that (you use the wrong way to call it) :

game.ReplicatedStorage.RemoteEvent1:FireServer()

I hope that was helpful ! :wink:

There is no point of firing a remote event from a server script. The point of firing the server is to give the server information from the client. If you want to communicate between two scripts, you could use bindable events.

like how bindable sevent ? it work

like how bindable sevent ? it work can tell me

Bindable events work the same as remote events, except they are fired by server scripts and connected to server scripts.

oh ok out of my understanding in script

for anyone read this topic you can fix it with do local script after do fire server and do script.RemoteEvent1:FireServer() after that add remoteevent and add script and type all thing you need in script

If I can comprehend correctly, you are doing client to server method, right?

If that’s your case, you must use :FireServer() only in localscripts. Then you wanna use a server script to receive the event.

script.Parent.RemoteEvent1.OnServerEvent:Connect(function(player)
--your code here
end)

Consider that the first argument is automatically assigned in this method. The first argument is basically a player instance from a client that fired the remote.

I hope this helps with your situation. This is my second time trying to help someone, correct me if there is something wrong.

You need to use Bindable Event, you can fire it at server and detect when it fired

   --Firing
   Instance.new("BindableEvent"):Fire("Args")
  
   --Detecting On Fired
   Instance.new("BindableEvent").Event:Connect(function(...)
  	print(...)
   end)