Ad
Log in to vote
0

FE On | Unable to find script from client? (I included Screenshots ;-;)

Asked by 9 days ago
Edited 8 days ago

http://prnt.sc/gwcvjk

Hello, do note that Filtering Enabled is on which is why I am attempting to use remote functions.

The issue is I get a error in the client log that a script, "UserButtons" is: "Not a valid member of ServerScriptService" (https://prnt.sc/gwcvjk screenshot of error upon user's gui button pressed)

This is the code on the user's script (location of script https://prnt.sc/gwcwck)

script.Parent.MouseButton1Click:connect(function()


--game.ServerScriptService:WaitForChild("UserButtons")  <--- Infinite yield
game.ServerScriptService.UserButtons.ResetPlayer:InvokeServer()


end)

This is the location of the RemoteFunction: https://prnt.sc/gwcw8m

And this is what is on the UserButtons script

script.ResetPlayer.OnServerInvoke = function(player)
    print("Button click detected")
end

I'm a bit clueless as to why I am getting the error. After doing some digging I am considering doing something like this: https://prnt.sc/gwd2v8 Just not sure if that is the correct way to go and if it is, should I script those codes on the server side or the client side?

Thank you for your time and any help/advice you can give -3-

Edit 1: If all else fails I'm just put script in workspace and attempt to script it from that location, I'm mainly putting it in ServerScriptServices for organization purposes.

Working Solution Moving objects to these locations and scripting them to eachother https://prnt.sc/gwnlzb

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

3 answers

Log in to vote
0
Answered by
CootKitty 296
8 days ago

LocalScripts can't access ServerScriptService, nor can they access ServerStorage. These services have the keyword server in them for a reason.

Move the remote to ReplicatedStorage, where the server and the client can access.

0
They can, however, their descendants are not replicated to the client. hiimgoodpack 1378 — 8d
0
They can't. CootKitty 296 — 8d
0
Ah, that makes perfect sense. ZeExplosion 11 — 8d
0
Go to studio, place a few scripts in server storage, start a local server, and if you go into player 1 and to explorer ServerScriptService still exists, but it cannot see the scripts. hiimgoodpack 1378 — 8d
0
Yes. But local scripts can't access ServerScriptService. CootKitty 296 — 7d
Ad
Log in to vote
-1
Answered by 8 days ago

To make the server see ur GUI u need to put the GUI in ServerStorage

And make a script in ServerScriptService and u gonna script it when the player joined u give the GUI

0
He's not trying to make the Server see the GUI. The client should handle GUIs when possible. CootKitty 296 — 8d
0
Ok Benjamin_pro1000 -4 — 8d
Log in to vote
-2
Answered by 9 days ago

It seems you aren't getting the service. Just change game.ServerScriptService to game:GetService ("ServerScriptService") and you should be good to go. By default, the player only can see the services it needs, so you have to request to get another service. If it still doesn't work, let me know.

0
No. CootKitty 296 — 8d
0
wrong wrong wrong the only service that is always loaded is Workspace. hiimgoodpack 1378 — 8d

Answer this question



Ad