of     1   

Alphaminusone
#228094282Sunday, November 26, 2017 5:42 PM GMT

When a player joins the game, they spawn at a random spawner with a string value of "NoOwner". The spawner has a value called Owner. When the player goes to the spawner, it's value changes to their name. Now, only the player with the same name as the stringvalue(Them) can spawn there. When they leave the value switches back to "NoOwner".
Y0_dude
#228095348Sunday, November 26, 2017 5:57 PM GMT

Throw all the spawners into a table called AvailableSpawners Then do something like this: local TakenSpawners = {} game.Players.PlayerAdded:Connect(function(plr) local random = math.random(1 , #AvailableSpawners) local spawner = AvailableSpawners[random] table.remove(AvailableSpawners , random) table.insert(TakenSpawners , spawner) spawner.Owner.Value = plr.Name plr.CharacterAdded:Connect(function(char) char:MoveTo(spawner.Position) end) end) game.Players.PlayerRemoving:Connect(function(plr) for i , v in TakenSpawners do if v.Owner.Value == plr.Name then v.Owner.Value = "NoOwner" table.remove(TakenSpawners , i) table.insert(AvailableSpawners , v) end end end)
Alphaminusone
#228106685Sunday, November 26, 2017 8:32 PM GMT

This is the script I made. Did I mess up? The randomization/Spawning in part work great. However, when I reset my character, they just go to another spawner, and not theirs. local AvailableSpawners = {I did game(dot)Workspace(dot)SpawnerNumber1-6) Roblox is filtering out this part.} local TakenSpawners = {} game.Players.PlayerAdded:Connect(function(plr) local random = math.random(1 , #AvailableSpawners) local spawner = AvailableSpawners[random] table.remove(AvailableSpawners , random) table.insert(TakenSpawners , spawner) spawner.Owner.Value = plr.Name plr.CharacterAdded:Connect(function(char) char:MoveTo(spawner.Position) end) end) game.Players.PlayerRemoving:Connect(function(plr) for i , v in TakenSpawners do if v.Owner.Value == plr.Name then v.Owner.Value = "NoOwner" table.remove(TakenSpawners , i) table.insert(AvailableSpawners , v) end end end)
Alphaminusone
#228114205Sunday, November 26, 2017 10:21 PM GMT

Bump.
UpbeatBamalot
#228114465Sunday, November 26, 2017 10:26 PM GMT

Where is this script? In Player Gui that resets on spawn?
UpbeatBamalot
#228114736Sunday, November 26, 2017 10:31 PM GMT

If it isn't, I don't see anything wrong
UpbeatBamalot
#228114983Sunday, November 26, 2017 10:35 PM GMT

Its a lua visibility issue I think New Code: local AvailableSpawners = {I did game(dot)Workspace(dot)SpawnerNumber1-6) Roblox is filtering out this part.} local TakenSpawners = {} game.Players.PlayerAdded:Connect(function(plr) local random = math.random(1 , #AvailableSpawners) local spawner = AvailableSpawners[random] table.remove(AvailableSpawners , random) table.insert(TakenSpawners , spawner) spawner.Owner.Value = plr.Name plr.CharacterAdded:Connect(function(char) for i, v in pairs(workspace:GetChildren()) if v:FindFirstChild("Owner") then if v.Owner.Value == plr.Name then -- Move Character end end end end) end) game.Players.PlayerRemoving:Connect(function(plr) for i , v in TakenSpawners do if v.Owner.Value == plr.Name then v.Owner.Value = "NoOwner" table.remove(TakenSpawners , i) table.insert(AvailableSpawners , v) end end end)
UpbeatBamalot
#228115127Sunday, November 26, 2017 10:38 PM GMT

Make sure to fill in the -- Move Character bit. Or you will get frustrated.
Alphaminusone
#228115527Sunday, November 26, 2017 10:45 PM GMT

So add this? plr.CharacterAdded:Connect(function(char) char:MoveTo(spawner.Position)
balcktack
#228118372Sunday, November 26, 2017 11:27 PM GMT

UpbeatBamalot
#228224994Wednesday, November 29, 2017 1:32 PM GMT

No, function is already connected, just do char:moveTo() or whatever

    of     1