#I need help
1 messages · Page 1 of 1 (latest)
😭😭
bro
** You are now Level 7! **
is their away like a script?
and also you mean like copy paste?
would that lag the server? im new so i dont really know
oof
if your new hold on
i used chatgpt for this but here follow this:
💡 What You’ll Need
A Folder in ReplicatedStorage for track pieces
A Folder in Workspace to store active track segments
A Script to handle spawning/moving/deleting tracks
Optional: Models with rails, environment props, etc.
✅ Step-by-Step Setup
📦 1. Prep Your Assets
Create a Part or Model for the road segment.
Make sure all segments are the same length (example: 50 studs long).
Place 2–3 of them in ReplicatedStorage under a folder named "TrackSegments".
🧠 2. Server Script to Handle Spawning
Put this script in ServerScriptService:
lemme script a code for u rq
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")
local SEGMENT_LENGTH = 50
local MAX_SEGMENTS = 10
local TRACK_FOLDER = Instance.new("Folder", Workspace)
TRACK_FOLDER.Name = "ActiveTracks"
local segments = ReplicatedStorage:WaitForChild("TrackSegments"):GetChildren()
local function spawnSegment(position)
local randomSegment = segments[math.random(1, #segments)]:Clone()
randomSegment.CFrame = CFrame.new(position)
randomSegment.Parent = TRACK_FOLDER
return randomSegment
end
local function setupTracks()
local trackParts = {}
local startZ = 0
for i = 1, MAX_SEGMENTS do
local segment = spawnSegment(Vector3.new(0, 0, startZ))
table.insert(trackParts, segment)
startZ += SEGMENT_LENGTH
end
-- Move segments to simulate motion
while true do
wait(0.05)
for i, segment in ipairs(trackParts) do
segment.CFrame = segment.CFrame - Vector3.new(0, 0, 1)
if segment.Position.Z < -SEGMENT_LENGTH then
segment:Destroy()
table.remove(trackParts, i)
local newSegment = spawnSegment(Vector3.new(0, 0, (MAX_SEGMENTS - 1) * SEGMENT_LENGTH))
table.insert(trackParts, newSegment)
break
end
end
end
end
setupTracks()
try it out lemme know if any bugs
@harsh gulch
💀
you can make that with scripts
you cant make any good game, if you're new
you have to learn a few weeks / months how to script everything, how everything works and stuff like that
is their like a website i can learn from