Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] I learned how to :InvokeServer() and but, I got an error by using it on a gui?

Asked by 5 years ago
Edited 5 years ago

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.

1
Post some code so we can help you ForeverBrown 356 — 5y
0
Yes, please include some code. LisaF854 93 — 5y
0
Oh nvm, I just found that I have to put the RemoteFunctions to Replicated Storage, sorry for that! cherrythetree 130 — 5y

Answer this question