Hello my script gives me an error when the if statement is false
local function RaycastBullet()
local Target = mouse.target
local Damage = 10
if Target then
if Target.Parent.Humanoid then
Target.Parent.Humanoid:TakeDamage(Damage)
end
if Target.Parent.Parent.Humanoid then
Target.Parent.Parent.Humanoid:TakeDamage(Damage)
end
end
end

1 comment
Since it's only true or nil, if-else statements are okay.