Hey! I have a script that is generating this error:
And here is the part of the script that I need help with:
local maxDistance = startDirection.Magnitude
local direction = startDirection.unit
local lastPosition = startPosition
local distance = Instance.new("NumberValue")
distance.Value = 0
local ignore = {}
local hit, position, normal
local Blacklist = RaycastParams.new()
Blacklist.FilterType = Enum.RaycastFilterType.Blacklist
Blacklist.FilterDescendantsInstances = ignore
while true do
if not distance.Value >= maxDistance - 0.1 then -- It errors here. As you can see, none of these are booleans.
if not (hit and hit.CanCollide) then
distance.Changed:Wait()
end
end
end
