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

How would I make a Rounds script?

Asked by
lomo0987 250 Moderation Voter
10 years ago

I don't want any full scripts, if you wanted to you could.. But I would prefer to learn how to make them. I know i'm going to need to get the maps from lighting, clone it, spawn it, then teleport the players to the places.

I just don't know how I would set all of this up or even how to do it efficiently.

2 answers

Log in to vote
0
Answered by
Lacryma 548 Moderation Voter
10 years ago

You will need the positions preset for every map, so an invisible brick is actually what you'll want, or a table with the positions available.

To actually spawn the map from Lighting(I recommend to use ServerStorage), it is simply the act of cloning it and parenting it to Workspace.

To actually create a separate round I recommend having a function that takes care of all this:

function newRound()
    --important stuff here
end

This is necessary so that you will always be able to create a new round and to end a new round. There are more things necessary depending on what you want to do, however, you'll learn along the way. I would recommend a tournament game or round game script to look at, although most of them are not considered modern or good at all scripting wise(imo).

Overall, it should look like this:

function newRound()
end

function telePlayers(position)
end

function endRound()
end

function spawnMap() --Optional
end

However as I said it depends on what type of game you actually want to create. If you want to learn more, provide more information.

Ad
Log in to vote
-2
Answered by
IcyEvil 260 Moderation Voter
10 years ago

I believe you would have to do something along the lines of

game.Lighting.MapName:connect(function()
game.Lighting.MapName:Clone().Parent = game.Workspace
wait(HowLongMatchIs)
game.Workspace.MapName:Destroy()
end)

Then again This is just something I think you would need in it, Not sure entirely Never tested it myself.

Answer this question