1

# Grab ability keeps damaging the player, what the hell (?)

Edited 12 days ago

As the title says, I made this tool where when you click, you will grab, If you manage to grab a NPC or player, you will yeet them, the problem Is that the ability also damages the player, and the victim as well, like what the actual [Bleep].

Note: The tool has no handle

Script:

local tool = script.Parent
local debounce = false

tool.Activated:Connect(function()
if not debounce then
debounce = true
SLAP:Play()
tool.Parent["Right Arm"].Touched:Connect(function(hit)
local humanoid = hit.Parent:WaitForChild("Humanoid")
if humanoid ~= tool.Parent.Humanoid then
local Weld = Instance.new("Weld",tool.Parent["Right Arm"])
Weld.Part0 = tool.Parent["Right Arm"]
Yeet:Play()
wait(0.46)
local Yeet = Instance.new("VectorForce",humanoid.Parent.Torso)
local Attachment = Instance.new("Attachment",humanoid.Parent.Torso)
Yeet.Force = Vector3.new(0,300,-6000)
Yeet.Attachment0 = Attachment
Yeet.ApplyAtCenterOfMass = true
wait(.05)
humanoid:TakeDamage(250)
end
end)
wait(5)
debounce = false
end
end)

0
Did you try taking out line 28? taxicar24 19 — 12d
0
Try printing placing print(humanoid.Parent.Name) to see who it is damaging, then you can find out why Kingu_Criminal 120 — 12d

0
Edited 10 days ago

The problem is that it damages both of them? and not only the grabbed player? DIdn't quite understand

Assuming problem is damaging BOTH of them... uh...

After reading the whole script like 8 times, I can't really see why would it damage both players.

I don't see a line destroying the weld between the victims head and the player's arm Could it be that the victim is welded to the player so it damages both of them?

If that's not it I recommend you do what's said above, using print() to find out what's it damaging.

0
Xyternal 247
9 days ago

Maybe you can try this? Like you literally have a line that says humanoid:TakeDamage(250)
and then you ask why it is doing damage?

local tool = script.Parent
local debounce = false

tool.Activated:Connect(function()
if not debounce then
debounce = true
SLAP:Play()
tool.Parent["Right Arm"].Touched:Connect(function(hit)
local humanoid = hit.Parent:WaitForChild("Humanoid")
if humanoid ~= tool.Parent.Humanoid then
local Weld = Instance.new("Weld",tool.Parent["Right Arm"])
Weld.Part0 = tool.Parent["Right Arm"]
Yeet:Play()
wait(0.46)
local Yeet = Instance.new("VectorForce",humanoid.Parent.Torso)
local Attachment = Instance.new("Attachment",humanoid.Parent.Torso)
Yeet.Force = Vector3.new(0,300,-6000)
Yeet.Attachment0 = Attachment
Yeet.ApplyAtCenterOfMass = true
wait(.05)

end
end)
wait(5)
debounce = false
end
end)

0
Xyternal 247
9 days ago

Maybe you can try this? Like you literally have a line that says humanoid:TakeDamage(250)
and then you ask why it is doing damage?

local tool = script.Parent
local debounce = false

tool.Activated:Connect(function()
if not debounce then
debounce = true
SLAP:Play()
tool.Parent["Right Arm"].Touched:Connect(function(hit)
local humanoid = hit.Parent:WaitForChild("Humanoid")
if humanoid ~= tool.Parent.Humanoid then
local Weld = Instance.new("Weld",tool.Parent["Right Arm"])
Weld.Part0 = tool.Parent["Right Arm"]
Yeet:Play()
wait(0.46)
local Yeet = Instance.new("VectorForce",humanoid.Parent.Torso)
local Attachment = Instance.new("Attachment",humanoid.Parent.Torso)
Yeet.Force = Vector3.new(0,300,-6000)
Yeet.Attachment0 = Attachment
Yeet.ApplyAtCenterOfMass = true