Im trying to convert a custom name script. It's an on-screen button that you click, and it should give you a name. That name should be seen by other players. However, im trying to convert it into FE. Should i use :FireServer() or :FireClient()?
When should you use :FireServer() and when should :FireClient() be used?
2 answers
Welcome,
There are several types of :Fire things that might help you, I will describe you what each one do so you can choose your the most suitable one for your case:
When you have a local script you need use
:FireServer()because local scripts work on client side.If you got a server script and you want a specific client to do something you need to use
:FireClient(player). This will fire the client of the mentioned player in the brackets.If you want to fire all clients you can use
:FireAllClients()this will fire all the clients in your server.
To perform all the above you'll need a RemoteEvent if you don't have one already. You can read more about RemoteEvents over here: https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events
Since you haven't mentioned what kind of script you are using to detect the click on the button I can't tell you which one you should use.
If you got any further questions please respond so I will be able help you.
Have a nice day :D
FireClient is Server to Local and FireServer is Local to Client. I think you should use :FireServer to do that.
Please accept my answer if you find this helpful.
-MajinBluee
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Im using a LocalScript.
Depending on what script you are using to fire, you use the opposite. If you are on a local script you use :FireServer() and :FireClient() or :FireAllClients() with a server script.