The title says it, i cannot find out what's wrong.
plr = game.Players[script.Parent.Parent.Name]
kamehameha = script.Parent
kamehameha.Touched:Connect(function(hit)
print("touched")
if hit.Parent:FindFirstChild("Humanoid") == true then
humtodmg = hit.Parent:FindFirstChild("Humanoid")
humtodmg.Health = humtodmg.Health - plr.Stats.KiMax/10
end
end)
also this script is disabled and it gets undisabled when this script copies it into a part.
blast = Instance.new("Part")
blast.Name = "blast"
blast.Shape = "Cylinder"
blast.BrickColor = BrickColor.new("Toothpaste")
blast.Transparency = 0.1
blast.Material = "Neon"
blast.CFrame = CFrame.new(ctr.HumanoidRootPart.CFrame.lookVector * 39 + ctr.HumanoidRootPart.CFrame.Position)
blast.CFrame = CFrame.new(blast.CFrame.Position, ctr.HumanoidRootPart.CFrame.Position) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
blast.Anchored = true
clone2 = clone:Clone()
clone2.Parent = blast
clone2.Disabled = false
clone2 = nil
blast.Size = Vector3.new(75,5,5)
blast.CanCollide = false
blast.Parent = ctr
clone2 is the clone of the script on the top

1 comment
Maybe try not to anchor the kamehameha but give it a bodyvelocitiy with a very small velocity and set the maxforce of the bodyvelocity to math.huge.