shooter2 = game.Workspace.Shot2
shooter1 = game.Workspace.Shot1
local player = game.Workspace.LocalPlayer
local bullet = Instance.new("Part")
bullet.Enabled = false 

damage = 14
damage2 = 20

function MouseClick()
	function onTouched(hit)
		local animation1 = shooter1.Rotation.Vector3.new(45, 0, 0)
		local animation2 = shooter2.Rotation.Vector3.new(45, 0, 0)
	if player:MouseClick(shooter1) then
		animation1 = true
		wait(1)
		animation1.Rotation.Vector3.new(90, 0, 0)
		bullet.Enabled = true 
		if player:MouseClick(shooter2) then
			shooter2.Rotation.Vector3.new(45, 0, 0)
			wait(1)
			shooter2.Rotation.Vector3.new(90, 0, 0)
		end
		if player:onTouched(bullet) then
			player:GetPlayers("Humanoid")
			player.Humanoid.Health:TakeDamage(damage)
		elseif player:onTouched(bullet) then
			bullet = true
			player:GetPlayers("Humanoid")
			player.Humanoid.Health:TakeDamage(damage2)
		end
	end
end
end

script.Parent.Mouse1ButtonClick:connect(MouseClick)
script.Parent.Touched:connect(onTouched)

It's suppose to be, when you shoot, a bullet comes out and if a bullet hits a player, damage happens.

4 comments

1

tl;dr, but at the end, when you connect to MouseClick, you put three t's in Button.

0

Ah thanks. Other than that, it should work?

0

Well ALL scripts are SUPPOSED to work. That's why you write them

0

Ok