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

Script sometimes works but other times it doesn't work, not getting errors?

Asked by 7 years ago
Edited 7 years ago

This script teams the player to Playing and in X amount of seconds respawns them in the lobby, for some reason when respawning the players so they can go onto the games map it doesn't work while other times it works. game https://www.roblox.com/games/1352607389/DominatedLegacys-Place-Number-240

001--Variables
002local Map = game.Workspace.Map
003local Lobby = game.Workspace
004local ZLobby = game.Teams.ZLobby
005local TextValue = game.ReplicatedStorage:WaitForChild("TextValue")
006local Sounds = game.Workspace.Sounds
007local NewSound = Instance.new("Sound")
008local maps = game.ReplicatedStorage:WaitForChild("Maps")
009local gametime = 5
010 
011 
012 
013 
014 
015 
View all 124 lines...

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Try this

001--Variables
002local Map = game.Workspace.Map
003local Lobby = game.Workspace
004local ZLobby = game.Teams.ZLobby
005local TextValue = game.ReplicatedStorage:WaitForChild("TextValue")
006local Sounds = game.Workspace.Sounds
007local NewSound = Instance.new("Sound")
008local maps = game.ReplicatedStorage:WaitForChild("Maps")
009local gametime = 5
010 
011 
012local function Reward()
013 
014        for _, player in pairs(game.Players:GetPlayers()) do
015                    player.Playing.Value = true
View all 103 lines...
Ad

Answer this question