I'm pretty new to scripting and I got curios how to make a gun. I looked at some examples from the toolbar hoping to find some ideas on how to script a gun, but I noticed that there wasn't any remote events or anything that could have used to communicate with the server in the gun I found. All there was is a local script, there was some scripts but it doesn't really do anything with damaging. I tried making a simpler version of the local script but it doesn't work.
local Mouse = game.Players.LocalPlayer:GetMouse()
script.Parent.Activated:Connect(function()
local Target = Mouse.Target
if Target then
local Humanoid = Target.Parent:FindFirstChildWhichIsA("Humanoid")
if Humanoid then
Humanoid:TakeDamage(100)
end
end
end)

5 comments
You should damage the humanoid on the server as the damage will only be seen locally with filtering enabled on
As i said don't do the damage in a local script its pretty simple
As i said don't do the damage in a local script its pretty simple
My question was "Is it possible to damage a humanoid using only a local script?" BECAUSE i found a gun which can DAMAGE ONLY USING A LOCAL SCRIPT
can you please at least look at the gun and see the local script