Hello everyone! I’m currently doing some work with raycast normals, and I’ve come across this really weird behavior, as seen in this video here
That’s obviously just a demo of the issue, but I’m really stumped on what the root cause is. My code is below, if that helps (just a mockup for testing).
local function ray(pos)
return workspace:Raycast(pos,Vector3.new(0,-100,0))
end
script.Parent:WaitForChild("Part").Changed:Connect(function()
local r = ray(script.Parent.Part.Position)
if r then
script.Parent.Snap.CFrame = CFrame.new(r.Position,r.Position + r.Normal)
end
end)
Any help is greatly appreciated, I’m genuinely confused as to what’s going on.