Is there a way to fire remote events from server scripts?

Yes yes, you’re probably thinking I’m some crazy mad man by reading the title, but I’m trying to achieve something that requires this.

I’m making a game that’s similar to Portal and I want a way to bind the button to the door when the button is pressed, by firing a remote event. Except, the button doesn’t need a local script. Is there any way to do this, or any similar trick I can use? I know I can just put a touched event in a local script, but that’s kinda tedious, so I’m just looking for a way.

2 Likes

Hey there!
Bindable event may be a sloution for you. You can fire it from server and catch it also from server. But I think there are better sloutions anyways.

4 Likes

You can use a BindableEvent to transfer information from 1 server script to another. If you’re trying to do something like **:**FireServer from a server script then you’d need to use 2, or 1 if you wanna get crafty.

Bindable Event Way:
In a server script
BindableEventInstance:Fire(…, …, …)
In another server script,

BindableEventInstance.Event:Connect(function(…)

Other way:
Server script:
Event1:FireClient(Player)

LocalScript:
Event1.OnClientEvent:Connect(function( . . .
Event2:FireServer(…)

5 Likes