I have a script meant to give me an item, and I can't get the remote event to work with FireClient. Here's what I have so far:
localscript:
script.GiveItem.OnClientEvent:Connect(function(item,amount)
--item giving code didn't put because it's too long
end)
normal script:
canGive = true
script.Parent.Touched:Connect(function(hit)
if canGive == true then
canGive = false
play = game.Players:GetPlayerFromCharacter(hit.Parent)
play.PlayerGui.Inventory.InvScript.GiveItem:FireClient(play,"CopperShortsword",1)
end
end)
Notes: -play is not null, I already tested that -the problem isn't with the item giving code, tested that too

4 comments
Is the function in the local script being run at all or does the function have a error? Put a print in it.
Prints don't send anything to my output (even if I put it first line)
The entire point of client events is for the server to not access the client. By putting the RemoteEvent inside of the client, you essentially made it invisible to the server. Put the RemoteEvent in ReplicatedStorage instead.
Still ins't working