The script in the gun (Local)
game.ReplicatedStorage.EventsAndValues.GiveGun.OnClientEvent:Connect(function()
local player = game.Players.LocalPlayer
local gun = game.ReplicatedStorage.Handgun
gun.Parent = player.Backpack
end)
The line of code that fires on a brick touch
game.ReplicatedStorage.EventsAndValues.GiveGun:FireAllClients()
