I though you need to use RemoteEvents to send a object from client to server and I found a tutorial to make a script FE and anyways I also can use RemoteFunction, but the problem is:

So I tried using UserInputService and RemoteFunction and it succeed when I kept switching on server to client, and I see both but when I try it on a GUI TextButton, it says that I have to use it on server, and I used it on server and still gave me an error, I don't want to use UserInputService because mobile players can't use the blast. Here is the children of the GUI.

  • Attacks
    • LocalScript
    • Blast
      • LocalScript
      • bom (formerly, the RemoteFunction but put it inside of the GUI but later I put it back to ReplicatedStorage.)
      • Cooldown
      • ImageLabel

If you don't get what I mean, I previously pressed E in a Script outside StarterGui and is on ServerInputService and it works for FE now, but when I use it on a Attack Spell GUI, it sends me the error that I have to use it on a server.

3 comments

1

Post some code so we can help you

0

Yes, please include some code.

0

Oh nvm, I just found that I have to put the RemoteFunctions to Replicated Storage, sorry for that!