after that line print(Humanoid)
after this line print(humanoid)
after that line print(Humanoid)
after this line print(humanoid)
and it doesn’t print out anything lol
wait wait what not even humanoid ?
Just checking are you using local script or script
i’m using a normal script lolol
Now i need you to do something as I need to know where it stopped.
Can you try to print something every 3 lines?
it stops at “hi3”
if raycastResult then
print("hi1")
local RayInstance = raycastResult.Instance
if RayInstance then
print("hi2")
local character = RayInstance.Parent.Parent
if character then
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
print("hi3")
humanoid:TakeDamage(10)
end
else
character = RayInstance.Parent
if character then
print("hi4")
local humanoid = character:FindFirstChild("Humanoid")
print(Humanoid)
if Humanoid == nil then
print("hi5")
Humanoid = RayInstance.Parent.Parent
print(Humanoid)
if humanoid then
print("hi6")
humanoid:TakeDamage(10)
end
end
end
end
end
end
humanoid:TakeDamage(10)
after that print(“hi idk”)
and before that print(humanoid)
you’re on to something when i faced sideways it stopped printing “hi3” and “hiidk” and it doesn’t print the humanoid when i facesideways. yeah it prints “hi2” and “hi1”
but it printed “hi2” ?
yes i tried putting (char)
print(character)? as it’s sus cuz if thats the case then character would be workspace but it shouldnt be
print(character) prints out “Workspace”
Exactly BRO FOR 30 MINS I SUSPECTED THIS
change this to
local character = RayInstance.Parent
yeo now it works! BUT now it’s not damaging the player when i’m facing it
I see.
change into
if RayInstance.Parent.Parent.Name == "Workspace" then
character = RayInstance.Parent
else
character = RayInstance.Parent.Parent
end
if this doesnt work then im gonna change the script into the turret killing me instead
LETSS GOOOO IT WORKS!!! WHOOO FINALLY I SPENT 2 WHOLE DAYS TRYING TO FIGURE THIS OUT THANK YOU, also thanks jack and atscripterboy !!!
yes i love life now after 1 hour
How the heck did the Parent make it to the game property what
because when it hits the arm then it will return arm
and arm.Parent.Parent is Workspace
but when it is facing foward then it may hit Handle
Which Handle.Parent.Parent would be Character