I want the player to be able to buy an item when they click on a shop gui button, at first i put the code in a local script alone but i realised the player's money value only changed for them so i used a remote event and it didn't work, so i tried just printing a message with the remote event instead.That didn't work either, and I didn't get an error message either I re-watched tutorials on remote events and read up on filtering enabled on the roblox wiki, I watched more tutorials on remote events and found that there are also remote functions, I read post relating to remote events on the dev forum, I tried the solutions on all the sources I mentioned before and have been at it for a about 2 days and still can't find the reason the code won't work nor any clue as to a solution this is my first time using remote events, someone please help, the code is below
--Local Script(Client) --purchase is the name of my remote event script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.purchase:FireServer() end)
--Script(Server) --the scripts parent is replicated storage and same for the remote event script.Parent.purchase.OnServerEvent:Connect(function(player) print(player.Name) end)
It seems that you have placed the Server Script inside the Replicated Storage. Scripts inside Replicated Storage do not execute. You should place any server scripts inside the ServerScriptService.