How To Make a Team Cap Limit | Roblox Studio

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • Welcome back to another video! If you enjoy then leave a like and subscribe for more videos.
    Download Today's Project: www.roblox.com/library/818695...
    Time Stamps:
    Introduction: 0:00
    Making Animation: 0:10
    Making UI: 3:00
    Scripting: 4:25
    Finished Product: 7:15
    ------------------
    Links
    ------------------
    Server Team Cap Script: pastebin.com/HAqCvwR3
    Set Team On Spawn Script: pastebin.com/L8Sm7tzF
    Local Script Manage: pastebin.com/zjwN4H6f
    Discord: / discord
  • ХоббиХобби

Комментарии • 51

  • @brandon6114
    @brandon6114 2 года назад

    THANK YOU. Imma try his out when I get the chance :)

  • @random9159
    @random9159 Год назад

    THANKS SO MUCH OMG!!! criminally underrated tutorial!!!

  • @koyrnusigma
    @koyrnusigma 2 года назад

    OMG THXXXXXX

  • @TopTenKewl.
    @TopTenKewl. Год назад

    bro you need like 200k subs ngl

  • @DougCraftOfficial
    @DougCraftOfficial Год назад

    I couldn’t make a one person only door for my roleplay game, so I’ll make it a team cap of one for the certain roles

  • @Vrguy958
    @Vrguy958 Год назад +1

    i like how he just cuts the video when he says "and then"

  • @gamingraptorzzz8732
    @gamingraptorzzz8732 2 года назад +1

    can you please make it so when you click the button it tps you to the spawn you chose.

  • @froxdoggaming3385
    @froxdoggaming3385 Год назад +2

    i JUST want the team cap, not the GUI with it

  • @gornthegoon
    @gornthegoon 2 месяца назад

    Man why does the video cut off early, I couldn't finish the code D:

  • @fajam2362
    @fajam2362 2 года назад +7

    Thank you mate! this is really helping me! and now my game are finished!
    EDIT : It doesnt work lol-

    • @KashTheKingYT
      @KashTheKingYT  2 года назад

      What seems to be the issue

    • @random9159
      @random9159 Год назад

      desprately trying to notifi this person so they can finish there game

    • @pyrexx1241
      @pyrexx1241 11 месяцев назад +1

      @@KashTheKingYT the fact you added like 3 things when u cut the vid

  • @MrHorrorFan772
    @MrHorrorFan772 2 года назад +1

    Put a remote function in replicated storage

  • @Yo-Mailz
    @Yo-Mailz 2 месяца назад

    It dosen't work, I used an int value, I copied your code in the pastebin, and it still wont work.

  • @polska8928
    @polska8928 Год назад

    can you do like you need to be in a group to join a team? pls i need it

  • @Wafffez
    @Wafffez 2 года назад +2

    Remind me 3 years when his voice gets way deeper

    • @KashTheKingYT
      @KashTheKingYT  2 года назад

      Lol

    • @Wouyyy
      @Wouyyy Год назад +1

      Its been a year already not sure if his voice is deeper or something but check him out

    • @Wafffez
      @Wafffez 9 месяцев назад

      It says edited but I didn’t edit it to make it like that

    • @legobird.
      @legobird. 9 месяцев назад

      Reminded!

  • @dangelodraws4142
    @dangelodraws4142 Год назад

    i just wanted to know how to set a cap for a 2 person game, not for everything else!

  • @TechnoBloxYT
    @TechnoBloxYT Год назад

    I have been on my computer, trying to fix it but it still won't work at all... Everytime I clicked a team button to select, it only says the Error label. I did not skip (kinda) I copied the whole code, and still no luck. Can you help?
    Here's the code (with some different stuff) : Assign Team Script (The ServerScriptService one) : game.ReplicatedStorage.Selected.OnServerInvoke = function(plr, teamName)
    local team = game.Teams:FindFirstChild(teamName)
    if team and team:FindFirstChild("MaxPlayers") then
    if team.Cap.Value > #team:GetPlayers() then
    plr:LoadCharacter()
    plr.Team = team
    return true
    else
    return false
    end
    end
    end
    Manager (One in the GUI) :
    local gui = script.Parent
    local buttons = gui:GetChildren()
    for _,button in pairs(buttons) do
    if button:IsA("GuiButton") then
    button.Activated:Connect(function()
    local success = game.ReplicatedStorage.Selected:InvokeServer(button.Name)
    if success ~= true then
    gui.Error.Visible = true
    wait(1)
    gui.Error.Visible = false
    else
    gui.Joined.Visible = true
    wait(1)
    gui.Joined.Visible = false
    end
    end)
    end
    end
    Lastly Team Pick (StarterCharacterScripts) :
    local gui = script.Parent
    local buttons = gui:GetChildren()
    for _,button in pairs(buttons) do
    if button:IsA("GuiButton") then
    button.Activated:Connect(function()
    local success = game.ReplicatedStorage.Selected:InvokeServer(button.Name)
    if success ~= true then
    gui.Error.Visible = true
    wait(1)
    gui.Error.Visible = false
    else
    gui.Joined.Visible = true
    wait(1)
    gui.Joined.Visible = false
    end
    end)
    end
    end
    There, please let me know if there is any problem with my script.
    (I have a feeling you're just going to heart react it tbh)

    • @KashTheKingYT
      @KashTheKingYT  Год назад

      Make sure to follow the step where I add the limit values to each team

  • @MrHorrorFan772
    @MrHorrorFan772 2 года назад

    Reupload this tutorial with better cuts, the reason it doesnt work is because he cuts and doesn't show us stuff that we are supposed to do

  • @EEE-vl4hy
    @EEE-vl4hy 9 месяцев назад

    WHY COULDENT YOU HAV THE SCRIPTS IN BIO WHY

  • @rickeyg8411
    @rickeyg8411 2 года назад

    Oh dam his alive

  • @brandon6114
    @brandon6114 2 года назад +1

    Can you make a hat tool? If you click it’ll equip the hat on your head and if you click again it’ll take it off

  • @Samster7u
    @Samster7u 2 года назад +2

    Its not working when i click to change team it dont work

  • @M0nitor242
    @M0nitor242 2 года назад +3

    can you make a random team chooser with a limit? P L S

  • @ItsDiv2512
    @ItsDiv2512 Год назад

    Im trying to make an infection type game but i want the infector to be randomized instead of selected.

    • @KashTheKingYT
      @KashTheKingYT  Год назад

      local allPlayers = game.Players:GetPlayers()
      local infector = allPlayers[math.Random(1,#allPlayers))

    • @notes4843
      @notes4843 Год назад

      @@KashTheKingYT Where do we put it

  • @timpriktatarstan
    @timpriktatarstan 4 месяца назад

    IS NOT WORKING

  • @MrHorrorFan772
    @MrHorrorFan772 2 года назад

    whats with the random cuts

  • @mr.banana1699
    @mr.banana1699 Год назад

    32nd

  • @ytaddax5916
    @ytaddax5916 Год назад

    it doesn't work, not at all. I highly recommend you make another one please.

  • @KacperBe_
    @KacperBe_ 8 месяцев назад

    and then....?
    Edit: I see you liked this comment but i need an answer
    Edit 2:Now you unliked it

  • @brandon6114
    @brandon6114 2 года назад +1

    This didn’t work btw :/

    • @KashTheKingYT
      @KashTheKingYT  2 года назад

      What happened!?

    • @brandon6114
      @brandon6114 2 года назад

      @@KashTheKingYT when I press switch team it just says “team limit full” and the values were set to 3. Even though the team isn’t full.

    • @buggerofallhell1153
      @buggerofallhell1153 2 года назад

      @@brandon6114 god

  • @syahid186
    @syahid186 Год назад

    I dont know if i skipped on bideo or what but how to make like the specific team have like 4 or 5 team limit? I dont understand where to edit the value.

    • @KashTheKingYT
      @KashTheKingYT  Год назад

      The MaxPlayers int value in each team will determine it.
      Change the value inside it.
      Here is the timestamp: 3:53

  • @TheDivineWhitebeard
    @TheDivineWhitebeard 2 года назад

    :/