local TakeDamage = game:GetService("ReplicatedStorage").FireTakeDamage
script.Parent.Parent.Activated:Connect(function()
local char = script.Parent.Parent.Parent
if char.Parent == workspace then
local player = game.Players:GetPlayerFromCharacter(char)
local dmg = player.Strength.Value
script.Parent.Touched:Connect(function(hit)
if hit.Parent ~= char then
if game.Players:GetPlayerFromCharacter(hit.Parent) then
TakeDamage:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent), player)
end
end
end)
end
end)
this is the script i use in the tool when they damage a player, but i don’t think it effects dummies
local event = game:GetService("ReplicatedStorage").TakeDamage
event.OnServerEvent:Connect(function(player, hitBy)
local char = player.Character
local hitByStrength = hitBy.Strength.Value
local endurance = player.Endurance.Value
local hitByChar = hitBy.Character
if not player.Safe.Value and not hitBy.Safe.Value then
if endurance > hitByStrength * 10 then
hitByChar.Humanoid.Health = 0
elseif endurance > hitByStrength then
hitByChar.Humanoid:TakeDamage(hitByStrength * 0.1)
char.Humanoid:TakeDamage(hitByStrength * 0.9)
else
char.Humanoid:TakeDamage(hitByStrength)
end
end
end)