Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I fix this Map loading script?

Hi, I am a beginner in Lua, I tried to make a script that loads a map onto the workspace and then teleports the players to the spawn place of each group, I tried the loading maps script and it worked, but I have no Idea on how to teleport a player to a place and make him spawn only in that place until the round is completed.

Please help me ,I tried opening catalog and searching for map loaders, but the seem to be much advanced.

wait(10)
game.ServerStorage.Lava:Clone().Parent = game.Workspace
game.ServerStorage.Weapons.Sword:Clone().Parent = game.Player:FindFirstChild("Backpack")
wait(300)
game.Workspace.Lava:Destroy()
game.Players:kill()
wait(10)
-- other map coming soon

2 answers

✓ Accepted answer

First of all, it's Game.Players not game.Player.

Second, if you want to kill all the players use this:

p = game.Players:GetChildren()

for i = 1,#p do
  p[i].Character.Head:remove()
end

Good job so far. Just gotta keep practicing.

1 comment

0

Ohh thx, I need to practice more on thr for thing, I am confused onto it, But okay... (Though it's not the answer I was looking for but thx!)

Pretty Sure That The Game.players:kill() Wont do anything

1 comment

0

I made it to kill all the players and to respawn them in lobby(I really dont know if that works)

This discussion is preserved as it was. New answers, comments, and votes are closed.