Right now my "Taser" only works for "Player1". How do I make it so it works for any player?
Tazer = game.StarterPack.Tazer.Handle
TazerPlayer = game.Players.Player1.Backpack.Tazer.Handle -- how do I make this apply to any player.Backpack.Tazer.Handle?
Robot = game.Workspace.Robot
RobotHealth = game.Workspace.Robot.Humanoid
function tazed(hit)
print("TAZED")
print(hit.Name)
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 10
hit.BrickColor = BrickColor.new("Teal")
hit.Sparkles.Enabled = true
wait(0.8)
hit.Sparkles.Enabled = false
hit.BrickColor = BrickColor.new("Black")
if hit.Parent.Humanoid.Health < 1 then
hit.Anchored = false
end
end
TazerPlayer.Touched:connect(tazed)

2 comments
Is it a local script?
It is not a local script