So, i’ve been really trying to make a scrolling street script, but i’ve ran into a total road block that not only slows the game’s FPS by a large amount, but does it so many times the road scrolling gets completely ran over by the fact the road itself is moving so fast, so i need help to try and get this to work…
what i want to acheive is a road scrolling effect like that you see in bus simulator, how the road continously goes backwards.
local Number = 1
local PastNumber = 0
local PastPastNumber = -1
local Template = game.Workspace.StreetTemplate1
while Number < 3000 do
wait(1)
for i,v in pairs(game.Workspace.StreetTemplate1:GetChildren()) do
wait()
if v.Name == "New"..(PastNumber) or "Curb" or "Grass" or "Median" or "Sidewalk" or "Street" or "Street Edge" and not "New"..(PastPastNumber) then
local new = v:Clone()
new.Parent = Template
new.Name = "New"..(Number)
new.Position = v.Position - Vector3.new(67.203,0,0)
else
return
end
end
PastPastNumber = PastPastNumber + 1
PastNumber = PastNumber + 1
Number = Number + 1
end
note that i created the road moving in another script, and it is not causing any errors
thanks for reading and,
please help!