can you help me fix the script?
arrow = script.Parent Owner = Instance.new("ObjectValue", arrow) Owner.Value = script.Parent.Name damage = 20 Hits = 0 function onTouched(hit) humanoid = hit.Parent:findFirstChild("Humanoid") if humanoid~=nil then if hit.Parent.Name ~= Owner.Value.Name then if Hits <= 3 then humanoid.Health = humanoid.Health - damage Hits = Hits + 1 --hit.Parent.Torso.CFrame = CFrame.new(hit.Parent.Torso.Position, arrow.Position) --hit.Parent.Torso.CFrame = CFrame.new(hit.Position) hit.Parent.Torso.CFrame = arrow.CFrame * CFrame.Angles(0, -3.14, 0) humanoid.Sit = true end wait(0.5) explosion = game.Lighting.Bewm:clone() explosion.Position = hit.Position explosion.Mesh.Scale = Vector3.new(0.1, 0.1, 0.1) explosion.Parent = workspace wait() end end if hit.Name == "Blast" or hit.Name == "StrongBlast" and hit ~= arrow then Hits = Hits + 1 wait(0.5) explosion = game.Lighting.Bewm:clone() explosion.Position = hit.Position explosion.Mesh.Scale = Vector3.new(0.1, 0.1, 0.1) explosion.Parent = workspace wait() end end arrow.Touched:connect(onTouched)
Your error is on line 3. An ObjectValue holds an Object, not a string. Simply remove the .Name
from the end of that line and your code should work.