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

Random map change with spawns?

Asked by 6 years ago

I have researching and trying to find a map changing script that teleports you from the lobby to the map for 30 seconds and then teleport back to the lobby for item buying for 50 seconds. does anyone know how I would be able to do that.

0
I know people may not like AlvinBlox but he has a tutorial series over this on YouTube on I think how to make a sword game or something. GottaHaveAFunTime 218 — 6y
0
Thank you I followed a tutorial but something happened with the code so, i am not sure you could answer that question? lolapus4 9 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Hello, Mynameisguiseppe here.

In order to teleport the player, you can use

game.Workspace.Player.Torso.Position = Vector3.new(0, 50, 0)

This script will move the players torso to the position stated. You can use

wait(30)

to wait 30 seconds. So this should be the full script. With a few tweaks, it should work for you.

game.Workspace.Player.Torso.Position = Vector3.new(MAP POSITION) wait(30) game.Workspace.Player.Torso.Position = Vector3.new(LOBBY POSITION) wait(50)

This script will work, but it wont repeat ever. You can use a simple Repeat command to make it repeat, if you would like.

if you want a randomly changing map, a little more work is involved in that. You will need math.random and variables.

0
Thanks I now have a working Game. Now i just need to make the maps lolapus4 9 — 6y
Ad

Answer this question