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

How can i teleport spawn locations?

Asked by 10 years ago

how can i make this script function

game.Workspace.RedSpawn.SpawnLocation1:MoveTo(map.RS1.Position)
    game.Workspace.RedSpawn.SpawnLocation2:MoveTo(map.RS2.Position)
    game.Workspace.RedSpawn.SpawnLocation3:MoveTo(map.RS3.Position)
    game.Workspace.RedSpawn.SpawnLocation4:MoveTo(map.RS4.Position)
    game.Workspace.RedSpawn.SpawnLocation5:MoveTo(map.RS5.Position)
    game.Workspace.RedSpawn.SpawnLocation6:MoveTo(map.RS6.Position)
    game.Workspace.RedSpawn.SpawnLocation7:MoveTo(map.RS7.Position)
    game.Workspace.BlueSpawn.SpawnbLocation1:MoveTo(map.bS1.Position)

map is the random thing the game has gotten from the lighting and its parent is a thing called GMAP

2 answers

Log in to vote
0
Answered by 10 years ago
function teleportation() -- you can change teleportation to whatever you want the function to be named. Now please understand a function runs any code of block through when it has been "created" and when it ends
game.Workspace.RedSpawn.SpawnLocation1:MoveTo(map.RS1.Position)
    game.Workspace.RedSpawn.SpawnLocation2:MoveTo(map.RS2.Position)
    game.Workspace.RedSpawn.SpawnLocation3:MoveTo(map.RS3.Position)
    game.Workspace.RedSpawn.SpawnLocation4:MoveTo(map.RS4.Position)
    game.Workspace.RedSpawn.SpawnLocation5:MoveTo(map.RS5.Position)
    game.Workspace.RedSpawn.SpawnLocation6:MoveTo(map.RS6.Position)
    game.Workspace.RedSpawn.SpawnLocation7:MoveTo(map.RS7.Position)
    game.Workspace.BlueSpawn.SpawnbLocation1:MoveTo(map.bS1.Position)
end -- ends the function
teleportation() -- If you changed the name of the function , "teleportation" to something else then you need to change this text to before the game doesn't detect what function you're calling. Oh did you think we called the function? No honey we only created one. To call it is quite simple, put the function name and the () after it then you have a perfect function that has been created and called ;) Ex: FUNCTIONAMEHERE()

Ad
Log in to vote
0
Answered by 10 years ago

found answer myself

    game.Workspace.RedSpawn.SpawnLocations.Position = map.RS1.Position

and so and so forth tnx for not helping im not gonna help on this website anymore

Answer this question