I was wondering how other people have done this with FE. I have the other aspects of the gun shop set up and they all work accordingly, but when it comes to actually give the player the gun I am at a loss. I have tried multiple methods and I still can not find something that actually wants to work. This is what I have:
script.Parent.MouseButton1Click:connect(function()
local player = script.Parent.Parent.Parent.Parent.Parent
local Mon = player.leaderstats.Cash.Value
if Mon >= 900 then
local update = Mon - 900
local Event = game.ReplicatedStorage.MoneyUpdate
Event:FireServer(update)
end
end)
After it fires the server to change the money and save the datastore, I do not know how to get the gun from server storage (Or possibly somewhere else if needed?) and into the player's backpack. I am having this issue because I can not get a server script to insert it into the backpack and I can not get a local script to do it either because then it just does not work.

3 comments
Guessing by the player variable your probably using a server script. Switch to local cause that the only way you can fire the Remote event. If ur unsure about your FE skills here's a good video explaining it:https://www.youtube.com/watch?v=vpPVNDXvfy8&list=PL9XdvFXu9ApD4Kt_StK1AgApdK9u6uRM-&index=4. Finally If you want to get a tool into the players backpack. clone it client side and parent it ser
@Bl-ueHistory: You can fire a RemoteEvent from the server or client.
No, it is a local script. I just copied it from an old server script and decided not to change that variable because it still works.