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

Why isn't this loading in correctly?

Asked by 3 years ago

This is supposed to load in the world if the value =1 but it loads in if it = anything

game.Players.PlayerAdded:Connect(function(Player)
    wait(1)
    local World = Player.Endings.World.Value
    if World == 1 then
        local Model = game.ServerStorage.Maps.Map1
        for _, Child in pairs(Model:GetChildren()) do
            Child.Parent = Model.Parent.Parent.Parent.Workspace
        end

        Model:Destroy()
    end
end)

1 answer

Log in to vote
0
Answered by 3 years ago

You need to remove the loop on line 6.

Ad

Answer this question