so i was trying to make a vampire script where on touched it will drag the player that is touched with the vampire while damaging the player any help on why it isnt working? there is no output errors on it here is the script:

local player = game.Players.LocalPlayer
local character = player.Character

character.HumanoidRootPart.Touched:connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local drag = Instance.new("BodyPosition",hit.Parent.HumanoidRootPart)
		drag.Parent = hit.Parent.HumanoidRootPart
		repeat
			drag.Position = character.HumanoidRootPart.Position
			hit.Parent.Humanoid:TakeDamage(13)
		until hit.Parent.Humanoid.Health == 0
	end
end)

2 comments

0

Use torso or head or some other part of the character instead.

0

I figured out the problem XD i forgot to enable the script