Local Script In The Tool Handle
local Player = game.Players.LocalPlayer --Gets local player
local Mouse = Player:GetMouse() --Gets the Mouse and defines it as mouse
local Tool = script.Parent.Parent --Defines tool as the parent of the parent of the script.
local Activated = false --True or false value
Tool.Equipped:Connect(function() --If the tool is equipped connect it to a function
Activated = true --Changes the Activated value to true
Tool.Unequipped:Connect(function() --If the tool is unequipped, connect it to a function
Activated = false --Change the Activated value to false
Mouse.Button1Down:Connect(function() --If there is a click, connect it to a function
if Activated == true then --If the variable Activated is true then it continues
game.ReplicatedStorage.FireGun:FireServer() --Fires the RemoteEvent.
Script in the Tool Handle - This defines the RemoteEvent
game.ReplicatedStorage.FireGun.OnServerEvent:Connect(function(player, part) --When the RemoteEvent is fired, connect it to a function. Player is the the player so it would print your player name. Part would likely be nil if you printed it.
local PlayerName = player.Name --Gets the player name
local FindGun = game.Workspace:FindFirstChild(PlayerName):WaitForChild("Gun") --Defines how to find the gun.
if FindGun ~= nil then --If it finds the gun
local SpawnBullet = game.Workspace.Bullet:Clone() --Defines SpawnBullet as a clone of the bullet in workspace.
SpawnBullet.Position = Vector3.new(FindGun.Handle.Position.X,FindGun.Handle.Position.Y, FindGun.Handle.Position.Z ) --Changes the position of the bullet to the Handle of gun
SpawnBullet.Parent = game.Workspace --Puts it in the workspace so you can see it.
SpawnBullet.Anchored = false --Changes it to unanchored so it falls to the ground.
You would first find the player, then look for them in the workspace. Then find the tool, then the position.
Note: You will need a bullet model in the workspace, or ServerStorage, if you’d like. And a remoteEvent in Replicated Storage. You can edit this script as you’d like. If you don’t understand anything, please ask.
An image for reference.