So I decided to make an infinite generating obby but I don’t know how. I searched on YouTube on how to make one and I came across this video: https://www.youtube.com/watch?v=gJg48CFb39Q
I have no idea what was wrong and I checked the script but I didn’t find anything.
THE SCRIPT IS A LOCAL SCRIPT AND IS IN REPLICATEDFIRST!
CODE:
if game:IsLoaded() == false then game.Loaded:Wait() end
local runService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local part = workspace.Start
local random = Random.new(game.ReplicatedStorage.Seed.Value)
local models = game.ReplicatedStorage.Models:GetChildren()
table.sort(models, function(a, b) return a.Name < b.Name end)
runService.Heartbeat:Connect(function(deltaTime)
if player.Character == nil then return end
if (part.Position - player.Character:GetPivot().Position).Magnitude > 200 then return end
local model = models[random:NextInteger(1, #models)]:Clone()
model:PivotTo(part.CFrame)
model.Parent = workspace
part = model.End
end)
I mean no its like a platform generates more often than the other one like the blue platform has a 70% chance of getting generated and the red platform has a 30% chance of getting generated