Yay, more on my fake physics because it'd be easier for what I'm making so, errors on collision, it only works on certain studs, could someone help?
This script detects the collision, for my local to handle, and say whether something's in the way or not :
detectLeft=function()
local ray = Ray.new(script.Parent.Parent.CFrame.p,((CFrame.new(100,0,0) * CFrame.new(script.Parent.Parent.CFrame.p)).lookVector).unit * 1)
local ignore = script.Parent
local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
if hit then
script.Parent.Left.Value=true
else
script.Parent.Left.Value=false
end
end
detectRight=function()
local ray = Ray.new(script.Parent.Parent.CFrame.p,((CFrame.new(-100,0,0) * CFrame.new(script.Parent.Parent.CFrame.p)).lookVector).unit * 1)
local ignore = script.Parent
local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
if hit then
script.Parent.Right.Value=true
else
script.Parent.Right.Value=false
end
end
detectForward=function()
local ray = Ray.new(script.Parent.Parent.CFrame.p,((CFrame.new(0,0,100) * CFrame.new(script.Parent.Parent.CFrame.p)).lookVector).unit * 1)
local ignore = script.Parent
local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
if hit then
script.Parent.Forward.Value=true
else
script.Parent.Forward.Value=false
end
end
detectBackwards=function()
local ray = Ray.new(script.Parent.Parent.CFrame.p,((CFrame.new(0,0,-100) * CFrame.new(script.Parent.Parent.CFrame.p)).lookVector).unit * 1)
local ignore = script.Parent
local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
if hit then
script.Parent.Backwards.Value=true
else
script.Parent.Backwards.Value=false
end
end
game:service'RunService'.Stepped:connect(function()
detectLeft()
detectRight()
detectForward()
detectBackwards()
end)
Is it that I'm not using lookvector, on the raycasting, or what? I'll experiment while waiting for answers. If you find nothing wrong, and you don't know what the problem is, it's that the collision only works in certain directions.

2 comments
Ah, thanks, :)
Make sure to select my answer if this helped, it gives us both rep!