Ad
Log in to vote
0

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

Asked by 11 months ago
Edited 11 months 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

3 answers

Log in to vote
0
Answered by
CootKitty 301 Moderation Voter
11 months 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 1835 — 11mo
0
They can't. CootKitty 301 — 11mo
0
Ah, that makes perfect sense. ZeExplosion 205 — 11mo
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 1835 — 11mo
0
Yes. But local scripts can't access ServerScriptService. CootKitty 301 — 11mo
Ad
Log in to vote
-1
Answered by 11 months 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 301 — 11mo
Log in to vote
-2
Answered by 11 months 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 301 — 11mo
0
wrong wrong wrong the only service that is always loaded is Workspace. hiimgoodpack 1835 — 11mo

Answer this question