Does anyone here know how to make a gun? Note that I am not using a tool and that it is a model that is welded to the players hand.
If you do know the please do tell me.
Thanks.
:D
Btw here's what I've done so far with my script
local Player = game.Players.LocalPlayer
local Chara = Player.Character
local Mouse = Player:GetMouse()
local Reloading = false
local FireEvent = script.Parent.FireEvent
function Reload()
if Reloading == true then
print("Broke")
return
end
Reloading = true
print("Reloading")
local Ammo = script.Parent.Ammo
local MaxAmmo = script.Parent.MaxAmmo
local Sound = script.Parent.Handle1.Reload
if Ammo.Value < MaxAmmo.Value then
Sound:Play()
wait(0.6)
Sound:Stop()
wait(2)
Ammo.Value = MaxAmmo.Value
Sound:Play()
end
wait(1)
Reloading = false
end
function Fire()
local Aim = Mouse.Hit
local Ammo = script.Parent.Ammo
local MaxAmmo = script.Parent.MaxAmmo
if Ammo.Value == 0 then
Reload()
return
end
FireEvent:FireServer(Aim)
print(Aim)
print("Fire")
local Sound = script.Parent.Handle1.Fire
Sound:Play()
end
Mouse.KeyDown:connect(function(Key)
if Key == "r" then
Reload()
end
end)
Mouse.Button1Down:connect(function(mou)
Fire()
end)

3 comments
We don't know what ur trying todo. Or want help with. This isnt a place to ask for people to finish ur scripts. But rather a website to get help and answers ;_:
sry im not really an answerer, my answers usually get disliked
I don't know how to make on everything without a tool, why not use a tool though? You can disable dropping and disable core guis to make it seem like a first person shooter. I'm not going to tell you exact script but on the ROBLOX Wiki there is a raycasting gun how to. As for ammo I recommend putting a number value inside the gun and using that as ammo. Then, set up a GUI and set off locals INSID