У нас вы можете посмотреть бесплатно Hide Team if Empty - Roblox Script Giveaway или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Very easy to add: I recommend adding your remote events in a folder in ReplicatedStorage called "Remotes" and then adding the RemoteEvent with a name like "HideTeam". Redefine it in both ServerScript and LocalScript: local HideTeam = ReplicatedStorage.Remotes.HideTeam DevForum: https://devforum.roblox.com/t/make-te... ---------------------------------------------------------------------------------------------------------------------- There is A SLIGHT CATCH: If you define your Team in LocalScript with a delay above or from StarterCharacterScripts, it will error! For example: local Teams = game.Teams task.wait(5) local Red = Teams.Red local Blue = Teams.Blue local Yellow = Teams.Yellow Error: Red is not a valid member of Teams "Teams" In order to fix this do: local Red = game:FindFirstChild("Red", true) This will look for the team name in the entire game! Make sure you didn't call another Instance Team Name though! Also, #team:GetPlayers() will error on LocalScripts so you will need to use a RemoteFunction to get the number of players from the server (Script). ---------------------------------------------------------------------------------------------------------------------- Script in ServerScriptService: local ReplicatedStorage = game.ReplicatedStorage local Teams = game.Teams -- I would name my RemoteEvent and then do local RemoteEvent = ReplicatedStorage.MyNewEventName local RemoteEvent = ReplicatedStorage:FindFirstChild("RemoteEvent") or Instance.new("RemoteEvent", ReplicatedStorage) -- Hide Team if Empty local function DetectTeamNumber() for i, team in ipairs(Teams:GetTeams()) do if #team:GetPlayers() == 0 then RemoteEvent:FireAllClients(team, true) else RemoteEvent:FireAllClients(team) end end end for i, team in ipairs(Teams:GetTeams()) do team.PlayerAdded:Connect(DetectTeamNumber) team.PlayerRemoved:Connect(DetectTeamNumber) end DetectTeamNumber() -- Keep this if you have Delays in your Script above! If you are Unsure, just keep it! Ima keep mine! ---------------------------------------------------------------------------------------------------------------------- LocalScript in StarterPlayer - StarterPlayerScripts: local ReplicatedStorage = game.ReplicatedStorage local Teams = game.Teams local RemoteEvent = game.ReplicatedStorage.RemoteEvent -- Set Team Visibility local function SetTeamVisibility(Team, IsEmpty) if IsEmpty then Team.Parent = ReplicatedStorage else Team.Parent = Teams end end RemoteEvent.OnClientEvent:Connect(SetTeamVisibility)