#I NEED HELP
11 messages · Page 1 of 1 (latest)
alr i will try to
get all the spawns in a folder then find the number of spawns. then you would use math.random() to select which spawn to move to
basically like a table
like this?
** You are now Level 1! **
-- Function to teleport players to a random map
local function teleportToRandomMap(player)
local randomMap = maps[math.random(1, #maps)]
player.Character.HumanoidRootPart.CFrame = randomMap.CFrame
end
oh mb lol
i would do this
local spawns = ...
local randSpawn = math.random(1, #spawns:GetChildren())
...:MoveTo(spawns:FindFirstChild(randSpawn).Position)```
youd have to define spawns and the character
alr ty