Boom Stick
ServerScriptService
ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild('BoomEvent')
local function boom(player, position)
local explosion = Instance.new('Explosion')
explosion.Parent = game.Workspace
explosion.Position = position
end
remoteEvent.OnServerEvent:Connect(boom)
LocalScript in Tool
LocalScript in Tool
local tool = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild('BoomEvent')
tool.Equipped:Connect(function(mouse)
mouse.Button1Down:Connect(function()
remoteEvent:FireServer(mouse.Hit.p)
end)
end)