#I need help with this script

13 messages · Page 1 of 1 (latest)

tame flume
#

Can someone edit this script so when all players die the round restarts.

local roundLength = 5
local intermsssionlength = 10
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status

local Lobby = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn

InRound.Changed:Connect(function()
if InRound.Value == true then
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = GameAreaSpawn.CFrame
end
else
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = Lobby.CFrame
end
end
end)

local function roundTimer()
while wait() do
for i = intermsssionlength, 1, -1 do
InRound.Value = false
wait(1)
Status.Value = "Intermission: ".. i .." secounds left!"
end
for i = roundLength, 1, -1 do
InRound.Value = true
wait(1)
Status.Value = "Game: ".. i .." secounds left!"
end
end
end

spawn(roundTimer)

uneven bronze
#

use the format

#

makes it much easier to read

timber sundial
#
local roundLength = 5
local intermsssionlength = 10
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status

local Lobby = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn

InRound.Changed:Connect(function()
    if InRound.Value == true then
        for , player in pairs(game.Players:GetChildren()) do
            local char = player.Character
            char.HumanoidRootPart.CFrame = GameAreaSpawn.CFrame
        end
    else
        for , player in pairs(game.Players:GetChildren()) do
            local char = player.Character
            char.HumanoidRootPart.CFrame = Lobby.CFrame
        end
    end
end)


local function roundTimer()
    while wait() do
        for i = intermsssionlength, 1, -1 do
            InRound.Value = false
            wait(1)
            Status.Value = "Intermission: ".. i .." secounds left!"
        end
        for i = roundLength, 1, -1 do
            InRound.Value = true
            wait(1)
            Status.Value = "Game: ".. i .." secounds left!"
        end
    end
end

spawn(roundTimer)
timber sundial
#

@astral ibex

astral ibex
#

did u just use some other guy's script

timber sundial
#

i made it myself!!

#
        print(1)
        local oldpos1 = OtherPlayer.CFrame 
        print("2")
        if OtherPlayer.Parent:FindFirstChild("HumanoidRootPart") then
            local otherhrp = OtherPlayer.Parent:WaitForChild("HumanoidRootPart")
            print("4")
            otherhrp.CFrame = CFrame.new(x,100,y)

        end
        wait(3)

        game.Debris:AddItem(Part,1.5)

        wait(10)
        hrp.CFrame = oldPos
        local otherHrp = OtherPlayer.Parent:FindFirstChild("HumanoidRootPart")
        otherHrp.CFrame = oldpos1
        game.Debris:AddItem(Domain,3)

    end)
end)```
#

the part with problem

#

otherplayer wont get tped away

#

😭