Roblox Studio - Hide & Seek Game | Random Map Selector & Frozen Seekers

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 11

  • @tropicalmasterpiece
    @tropicalmasterpiece  14 วันที่ผ่านมา

    Scripts Checkpoint:
    Main Script-
    local tweenService = game:GetService("TweenService")
    local players = game:GetService("Players")
    local serverStorage = game:GetService("ServerStorage")
    local serverScriptService = game:GetService("ServerScriptService")
    local repStorage = game:GetService("ReplicatedStorage")
    local pSpawn = repStorage:FindFirstChild("playSpawn")
    local module = require(serverScriptService:FindFirstChild("ExtraCommands"))
    local roundTime = 3 * 60
    local playerFolder = serverStorage:FindFirstChild("Hiders")
    local chosenFolder = serverStorage:FindFirstChild("Seekers")
    local hidercount = repStorage:FindFirstChild("hiderCount")
    local seekercount = repStorage:FindFirstChild("seekerCount")
    local status = repStorage:FindFirstChild("Status")
    local maps = serverStorage:FindFirstChild("Maps")
    while task.wait(5) do
    status.Value = "Waiting for players."
    -- Wait until two players have joined the game
    repeat task.wait() until #players:GetChildren() > 1
    status.Value = "Game Starting"
    -- Get our map
    local map = maps:GetChildren()[math.random(1,#maps:GetChildren())]
    local cMap = map:Clone()
    cMap.Parent = workspace

    task.wait(2)
    local playSpawn = cMap:FindFirstChild("playSpawn")
    pSpawn.Value = playSpawn.Position
    -- Starting the game
    local random = Random.new()
    local chosen = players:GetChildren()[random.NextInteger(random,1,#game.Players:GetChildren())] -- Picks random player
    print(chosen.Name.." has been chosen as the seeker.")
    for a,b in pairs(players:GetChildren()) do
    if b.Name ~= chosen.Name then -- if player is NOT it
    local playerName = Instance.new("StringValue",playerFolder)
    playerName.Name = b.Name
    local pChar = b.Character or b.CharacterAdded:Wait()
    pChar:PivotTo(playSpawn.CFrame)
    end
    end
    -- Send chosen player into battle
    local seekerTeleport = cMap:FindFirstChild("SeekerTeleport")
    local cChar = chosen.Character or chosen.CharacterAdded:Wait()
    cChar:PivotTo(seekerTeleport.CFrame)
    task.wait(.1)
    cChar.HumanoidRootPart.Anchored = true
    for i = 30,0,-1 do
    task.wait(1)
    status.Value = "Hide: "..i
    end
    cChar.HumanoidRootPart.Anchored = false
    module:setSeeker(chosen)
    -- Restart the game once hiders are no longer playing
    local number = roundTime
    while task.wait(1) do
    number -= 1
    status.Value = number
    hidercount.Value = #playerFolder:GetChildren()
    seekercount.Value = #chosenFolder:GetChildren()
    local over = false
    local Winners = {}
    local winner
    for a,b in pairs(playerFolder:GetChildren()) do
    if players:FindFirstChild(b.Name) == nil then
    b:Destroy()
    end
    end
    for a,b in pairs(chosenFolder:GetChildren()) do
    if players:FindFirstChild(b.Name) == nil then
    b:Destroy()
    end
    end
    if #playerFolder:GetChildren() == 0 then
    over = true
    winner = "Seekers"
    end
    if #chosenFolder:GetChildren() == 0 then
    over = true
    winner = "Hiders"
    end
    if number

    • @tropicalmasterpiece
      @tropicalmasterpiece  14 วันที่ผ่านมา

      ExtraCommands Module -
      local tweenService = game:GetService("TweenService")
      local players = game:GetService("Players")
      local serverStorage = game:GetService("ServerStorage")
      local serverScriptService = game:GetService("ServerScriptService")
      local repStorage = game:GetService("ReplicatedStorage")
      local module = {}
      local tagHandler = script:FindFirstChild("tagHandler")
      local playSpawn = repStorage:FindFirstChild("playSpawn")
      local hiders = serverStorage:FindFirstChild("Hiders")
      local seekers = serverStorage:FindFirstChild("Seekers")
      function module:weldPart(p0,p1)
      local weld = Instance.new("WeldConstraint",p0)
      weld.Part0 = p0
      weld.Part1 = p1
      end
      function module:freezePlayer(char)
      local rootTagged = char.HumanoidRootPart
      local freeze = Instance.new("Part",char)
      freeze.CFrame = rootTagged.CFrame
      freeze.Name = "Freeze"
      freeze.Transparency = 0.6
      freeze.BrickColor = BrickColor.Blue()
      freeze.Size = Vector3.new(1,1,1)
      freeze.Anchored = true
      module:weldPart(rootTagged,freeze)
      -- Make the freeze part expand
      local tweenInfo = TweenInfo.new(0.5,Enum.EasingStyle.Sine)
      local goal = {}
      goal.Size = Vector3.new(4.5, 6.5, 2.5)
      game.Debris:AddItem(freeze,5)
      local tween = tweenService:Create(freeze,tweenInfo,goal)
      tween:Play()
      tween.Completed:Wait()
      repeat wait() until char:FindFirstChild("Freeze") == nil
      local explosion = Instance.new("Explosion",char)
      explosion.Position = char.HumanoidRootPart.Position
      explosion.BlastPressure = 0
      local frozen = game.Players:GetPlayerFromCharacter(char)
      local counter = hiders:FindFirstChild(frozen.Name)
      if counter then counter:Destroy() end
      module:setSeeker(frozen)
      end
      function module:tagRadius(player)
      local char = player.Character or player.CharacterAdded:Wait()
      local root = char.HumanoidRootPart
      local ball = Instance.new("Part",char)
      ball.Name = "tagRadius"
      ball.CFrame = root.CFrame
      ball.CanCollide = false
      ball.Shape = Enum.PartType.Ball
      ball.Size = Vector3.new(9,9,9)
      ball.Transparency = 1
      local tagHandle = tagHandler:Clone()
      tagHandle.Parent = ball
      tagHandle.Enabled = true
      module:weldPart(root,ball)
      return ball
      end
      function module:setSeeker(seeker)
      local seekerValue = Instance.new("StringValue",seekers)
      seekerValue.Name = seeker.Name
      local spawnLocation = playSpawn.Value
      local cChar = seeker.Character or seeker.CharacterAdded:Wait()

      local highlight = Instance.new("Highlight",cChar)
      highlight.FillTransparency = 0.85
      highlight.OutlineTransparency = 0.4
      highlight.OutlineColor = Color3.fromRGB(255,0,0)

      cChar:MoveTo(spawnLocation)
      module:tagRadius(seeker)
      end
      return module

    • @tropicalmasterpiece
      @tropicalmasterpiece  14 วันที่ผ่านมา

      Tag Handler Script-
      local tweenService = game:GetService("TweenService")
      local players = game:GetService("Players")
      local serverStorage = game:GetService("ServerStorage")
      local serverScriptService = game:GetService("ServerScriptService")
      local repStorage = game:GetService("ReplicatedStorage")
      local module = require(serverScriptService:FindFirstChild("ExtraCommands"))
      local ball = script.Parent
      local charSeeker = ball.Parent
      local hiderFolder = serverStorage:FindFirstChild("Hiders")
      local seekerFolder = serverStorage:FindFirstChild("Seekers")
      local d = false
      ball.Touched:Connect(function(hitPart)
      local char = hitPart.Parent
      if d == false and char and char:FindFirstChild("Humanoid") and char:FindFirstChild("Freeze") == nil and hiderFolder:FindFirstChild(char.Name) ~= nil then
      d = true
      -- Freezing the player
      module:freezePlayer(char)
      -- Tagging the player
      print(char.Name.." has been tagged by "..charSeeker.Name..".")
      -- Remove the player from hiders
      for a,b in pairs(hiderFolder:GetChildren()) do
      if b.Name == char.Name then
      b:Destroy()
      end
      end
      d = false
      end
      end)

  • @xuongphimtranminhuc9900
    @xuongphimtranminhuc9900 15 วันที่ผ่านมา +1

    good game i love it. keep up!!

  • @koainanis5840
    @koainanis5840 13 วันที่ผ่านมา

    this is one of the best tutorial series i found 👍
    for me sometimes i struggle with you ;) but over all the game runs fine and i fixed or add some stuff i like.
    so thank you for the time and work ;)
    keep it up
    it would be nice if you can add:
    - afk system - so player can go afk and dont jump into the game.
    - winner (seeker or hider) get some coins
    - coins shop for some seeker and hider extras like speed or jump boost etc ;)
    - level system... only winners get some exp
    - based on the level system: give players an aura/title if they reached a specific level like 5, 10, 25, 50, 75, 100....

  • @DrakenTheOg
    @DrakenTheOg 13 วันที่ผ่านมา

    Yo sorry for being late but great video mate!

  • @RaphIsTooGood
    @RaphIsTooGood 13 วันที่ผ่านมา

    I really like this tutorial! I recommend adding more customisability options (e.g seeker skins, auras etc.) and a level system!

  • @BZP228
    @BZP228 3 วันที่ผ่านมา

    very good tutorial, but can you please make tutorial on IT skins?

  • @niju8075
    @niju8075 15 วันที่ผ่านมา

    Can you send me all scrips from past videos pls

    • @tropicalmasterpiece
      @tropicalmasterpiece  14 วันที่ผ่านมา +1

      I will pin a comment with all the scripts so far

    • @koainanis5840
      @koainanis5840 13 วันที่ผ่านมา

      @@tropicalmasterpiece thank you this helps some ppl i think. i dont need it cause i have my code that works fine ;)