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
COMMUNITY QUESTION
X is not a valid member of part. Am I doing it wrong?
1 answer
Do
part:WaitForChild("X")
THis is because x might of not loaded yet.
1 comment
0
Oh sorry read the information wrong.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Code block please. X is not a child of part, which means your Parents are wrong, X has never been there, you really mean part.Size.X or part.Position.X, or you need to wait for X to load in to Part.
It's not at all necessary to keep defining i
Your problem is that you're trying to call upon a property/ object that doesn't exist (w/in the parent object); if you want the Size/ Position, you are required to do BasePart.Size/ BasePart.Position, then retrieve the values from there.