I have a script like this.
local currentTarget: Basepart? = nil
if not currentTarget then
setState("Idle")
return
end
local input: Vector3 = (currentTarget.Position - collider.Position).Unit
setInput(input)
return nil
This causes a waring here
local input: Vector3 = (currentTarget.Position - collider.Position).Unit
Type of Basepart? could be nil
I am checkng at the top that Basepart is not nil, however the warning still appears. Is there a way to silence this waring?