X is not a valid member of part. Am I doing it wrong?
Asked by
7 years ago Edited 7 years ago
local part = script.Parent.Parent.FoxSeat
local i = 1
local model = script.Parent.Parent
local plat = model.platform
local Pointa = model.pointA
local Pointb = model.pointB
local bodyPos = plat.BodyPosition
local time = 6.5 --Time between motion
while true do
bodyPos.position = Pointa.Position
wait(0.1)
if bodyPos.position == Pointa.position then
for i = 1,180 do
wait(0.1)
part = Vector3.new(part.X +1, part.Y, part.Z)
wait(time)
bodyPos.position = Pointb.Position
wait(0.1)
if bodyPos.position == Pointb.position then
for i = 1,180 do
wait(0.1)
part = Vector3.new(part.X +1, part.Y, part.Z)
wait(time)
end
end
end
end
end
local i = 1