[SOLVED] Help on infinite road

@Revelted Your script has been finished but it is not cloning nor moving. I changed the naming stuff correctly to have the letter B but nothing is happening

Newly changed script
local PreviousPos = nil

for i = 1,100 --change 100 to the amount of times you want this looped

local ClonedPart = game.Workspace.Model4B.PartB:Clone()

ClonedPart.Parent = workspace
if PreviousPos == nil then
ClonedPart.CFrame = CFrame.new([POSITION OF START])
PreviousPos = ClonedPart.Position
else
ClonedPart.CFrame = CFrame.new(PreviousPos)+Vector3.new(ClonedPart.Size.X,0,0) -- this would generate a part infront of the previous one.
PreviousPos = ClonedPart.Position
wait(0.1)
end
end

Notice i put the letter “B” in some places in line 3
If you believe there is a solution to this let me know I have left it still for about 10 seconds and moved the Model4B around for 10 seconds as well (ending the first test obviously)

I am not trying to confuse you with unreasonable questions but I only put in the “B” due to wanting to keep all versions and seeing which version is the best.

This is how i put in your script (@Dev_HDWC this is how I will put in your script as well)
Capture2

@Dev_HDWC Your script has been finished but it has the same effect as rev’s. Here is the newly made script but I am not sure if I was supposed to rename anything due to me having a part named road and you told me to delete my other scripts and blah blah blah

Newly changed script
local road = {}
game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
       while true do
            if roadC[char.HumanoidRootPart.X] == nil then
                makeroadC(char.HumanoidRootPart.X)
                roadC[char.HumanoidRootPart.X] = true
            end
        end
    end)
end)

Notice where you put “road” i put the letter C afterwards. But I also noticed that your script involves the player itself. I am going to click play on my test server and see what happens. (fyi if your script was for a multiplayer server let me know now because I’m making a single player game)

you have spelt road wrong my friend. and makeroad
road not roadC

reverting script back to original

same thing ‘-’

30 characters

infiniteroad.rbxl (19.4 KB)
there’s your solution using the method i said.
Anywhere you want, doesnt even have to be inside the workspace or it can be server script service.

6 Likes

its official and i figured out how to change how the road looks! tysm for this it will really help me!

but quick question this can be placed anywhere in the workspace right? including in another model

This is my last question and i believe i can basically do the rest on my own. How do i change where i put in my road or which way the road faces cuz it kinda getting annoying having it in the middle of the map

@Dev_HDWC

2 Likes

If your still using mine you have to create a coordinate here example:
ClonedPart.CFrame = CFrame.new(0,20,0)

i will try that next

30 Characters

also thats how to move where to start am i correct?

Yep, the coordinates there are where the part starts and the road will continue in the X direction

@Dev_HDWC im sorry for this mention thing but how do you move where the infinite path starts.
Also I do not have discord You’re welcome roblox or any other place to chat but is there a way that i can get back to you if i need help later? if not thats ok

You can try messaging me on the devforum here, btw you can just add a Vector3 value to the position to offset it.

1 Like

tysm for your time here! If I need any more help with anything I may think about asking you again! again, tysm for your time here! :smile:

oh and ps i will give you credit so if you see a random mention in a #bulletin-board topic you will know why

1 Like

this chat has ended no other comments will be replied to by me until this comment gets deleted you are still allowed to comment though but my mode will not be at watching