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

Is this how i would load a map because it wont?

Asked by 8 years ago

So i am making a minigame game but the but the map wont load or the mini game. heres the code

while true do
    wait(30)
    local map = math.random(1,1)
    if map == 1 then
        game.ServerStorage.Map.Thefurture:Clone(game.Workspace)
    end
    local event = math.random(1,1)
    if event == 1 then
        game.ServerStorage.Events.Bombs:Clone(game.Workspace) 

    end
end

1 answer

Log in to vote
-1
Answered by
1N0body 206 Moderation Voter
8 years ago

Try this:

while true do
    wait(30)
    local map = math.random(1,1)
    if map == 1 then
        game.ServerStorage.Map.Thefurture:Clone().Parent = game.Workspace
    end
    local event = math.random(1,1)
    if event == 1 then
        game.ServerStorage.Events.Bombs:Clone().Parent = game.Workspace
    end
end

Clone simply returns a copied object, much like Instance.new()

Ad

Answer this question