Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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.

5 comments

0

They can, however, their descendants are not replicated to the client.

0

They can't.

0

Ah, that makes perfect sense.

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.

0

Yes. But local scripts can't access ServerScriptService.

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

1 comment

0

He's not trying to make the Server see the GUI. The client should handle GUIs when possible.

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.

2 comments

0

No.

0

wrong wrong wrong the only service that is always loaded is Workspace.

This discussion is preserved as it was. New answers, comments, and votes are closed.