Now my spawn location is pretty small. And this only pops up when i click on the dummy i’m using.
These are clearly pretty far away from eachother. And should NOT be causing any issues right?
I just can’t seem to get it to do any thing. Please help me out here.
EDIT
This is only one situation out of several.
EDIT 2
Failed to mention that this is a Local Script. My apologies.
Apologies, I guess I was wrong, I tried it just now. Are you ever moving your cursor to the sky or onto the terrain? It returns nil unless you’re pointing at a part.
Well my end goal is to have a script where when I click on a player (Or Dummy.) and my player looks at them. Waits a second or two then shoots them. A replication of The ISLE’s firearm system.
I think I see your problem. In your code, you have if mouse.Target and mouse.Target.Parent:FindFIrstChild('Humanoid'), you should check first for mouse.Target, and if mouse.Target exists, then make a separate if statement checking for the humanoid.
Yeah, exactly. Just split it into two separate if statements. I’ll provide a code sample:
while true do
if game.Players.LocalPlayer:GetMouse().Target then
if game.Players.LocalPlayer:GetMouse().Target.Parent:FindFirstChild('Humanoid') then
print('Humanoid located.')
else
print('Couldn\'t find humanoid.')
end
else
print('Target is nil.')
end
wait(1)
end