Hello, I am using a module to detect the players ViewportSize. As you can only detect it on a local script.
So I need the local script to fire a remote event to the server script but it fires to all the players.
Help would be appreciated.
Hello, I am using a module to detect the players ViewportSize. As you can only detect it on a local script.
So I need the local script to fire a remote event to the server script but it fires to all the players.
Help would be appreciated.
You use FireClient() use it on a normal script then boom your done!
I can't as i am firing it on a local script
ohh
As the other answer said, he's right. But, if you're firing from a local script, you'll need to use bindable events.
Here's a link: https://developer.roblox.com/en-us/api-reference/class/BindableEvent
Can i fire a bindable event from a local script?
Yes, you can fire it from the server and client.
it appears that the bindable events arent firing
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
Are you indexing player variable like 'OnServerEvent:Connect(function(player)'.
I just need the server to get the player that fired it and not to replicate to the whole server
The server cannot index 1 player, you should consider using :FireClient(--your name) This only does it for a client!
Alright i understand but the module i am using is on a server