I need it in Cframes----
I was thinking about using another Cframe script, make it move the same length as the road, then move it to the other road and make it go that way. And it repeats
I need it in Cframes----
I was thinking about using another Cframe script, make it move the same length as the road, then move it to the other road and make it go that way. And it repeats
If you want an infinite loop parts moving, you have to itirate through the parts if the vehicle and moving them by CFrames and turning around. Something like this:
for i = 1, math.huge do
for i,v in pairs(VEHICLEPART:GetDescendants()) do -- take the vehicle descendants
if v:IsA("Part") or v:IsA("UnionOperation") or v:IsA("MeshPart") then --[[ if the descendants is a part or similar]]
if i <= 20 then -- this is just an example, edit
v.CFrame = v.CFrame * CFrame.new(1, 0, 0) -- you can edit this
elseif i > 20 then
v.CFrame = v.CFrame * CFrame.new(-1, 0, 0) -- also here u can change rotation
end
end
end
end
Also, this will lag a bit, but if u want it with cframes, i think its the only way to do it.
This discussion is preserved as it was. New answers, comments, and votes are closed.