Hello everyone i am trying to make so that when you press a button it passes a parameter of the player and the button to another script. It's working in studio altough not when playing on a server ingame. I don't know what i have done wrong. The error i get from the command console is:
"FireClient can only be called from the server".
Local Script that passes the arguments and triggers the event:
script.Parent.MouseButton1Click:connect(function(plr) game.Workspace.Shop_Script.RemoteEvent:FireClient(plr,script.Parent, script.Parent.Parent.Parent.Parent.Parent.Parent) end)
script.RemoteEvent.OnClientEvent:connect(function(par, plr) --My code end)
Anyone know what i have done wrong?
Help would be really appreciated, thanks!