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
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.
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
It seems you aren't getting the service. Just change
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.