Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to equally distribute plates?

Asked by 5 years ago

So I'm trying to make a "Plates of Fate" type game and I got stuck on the part where I have to give each player their own plate and teleport them to their plate. This is what I managed to get so far but it only clones one plate and doesn't teleport the players.

01local plates = serverstorage:WaitForChild("Plates")
02local plateholder = game.Workspace:WaitForChild("Plates")
03local players = game:GetService("Workspace").Players.Value
04 
05function addplate(player)
06    local allplates = plates:GetChildren()
07    local newplate = allplates[math.random(1, #allplates)]:clone()
08    newplate.Parent = workspace.Plates
09    newplate.Player.Value = player.Name
10end
11 
12while true do
13    print ("start")
14 
15 
View all 66 lines...

Answer this question