local Service = game:GetService("RunService")
Service.Stepped:connect(function()
local H = 4
local Points = script.Parent:GetChildren()
for i = 1,#Points do
if Points[i] ~= script then
local ray = Ray.new(Points[i].Position,Vector3.new(0,-H,0))
local Part,P = workspace:FindPartOnRayWithIgnoreList(ray,script.Parent.Parent.Wheels:GetDescendants())
local Wheel = script.Parent.Parent.Wheels:FindFirstChild(Points[i].Name)
if Wheel then
Wheel.Position = P + Vector3.new(0,Wheel.Size.Y/2,0)
end
end
end
end)
Error: Position is not a valid member of NumberValue
Note: Error line:7
local ray = Ray.new(Points[i].Position,Vector3.new(0,-H,0))
I followed what others did, but It gives me errors. I don’t know why.