#Hi i don't know why this does not work and what the problem is or could

1 messages · Page 1 of 1 (latest)

obsidian oar
#

i was watching a tutorial because i am EXTREMLY new at this but it does not work

#

local PS = game.GetService("Players")
local TS = game.GetService("TweenService")
local UIS = game:GetService("UserInputService")
local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local Player = game.players.LocalPlayer
local CoreGUI = Player.PlayerGui:WaitForChild("CoreGUI")

CoreGUI.InfoFrame.PlayerImageLabel.Image = PS:GetUserThumbnailAsync( Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size48x48)

Player.HealthAmount.Changed:connect(function()
local HealthTween = TS:create(CoreGUI.InfoFrame.CurrentHealthTextLabel, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.out), {Size = UDim2.new(0, Player.HealthAmount.Value, 0, 25)})
HealthTween:Play()
CoreGUI.InfoFrame.HealthTextLabel.Text = math.round( Player.HealthAmount.Value).."/100"
end)

#

Player.StaminaAmount.Changed:connect(function()
local StaminaTween = TS:create(CoreGUI.InfoFrame.CurrentStaminaTextLabel, TweenInfo.new(0.2, Enum.EasingstStyle.Linear, Enum.EasingDirection.out), {Size = UDim2.new(0, Player.StaminaAmount.Value, 0, 25)})
StaminaTween:Play()
CoreGUI.InfoFrame.StaminaTextLabel.Text = Player.StaminaAmount.Value.."/100"
end)

local Running = false

local function StaminaRegen()
while not Running and Player.StaminnaAmount.Value < 100 do
Player.StaminaAmount.Value += 2

    if Player.StaminaAmount.Value >= 100 then
        Player.StaminaAmount.Value = 100
        break
    end
    
    task.wait(0.5)
end

end

#

UIS.InpuutBegan:Connect(function(input, Processed)
if input.UserInputType == Enum.UserInputType.Keyboard and not Processed then
if input.KeyCode == Enum.KeyCode.LeftShift then
Player.Character.Humanoid.WalkSpeed = 32
Running = true

        while Running do
            Player.StaminaAmount.Value -= 2
            
            if Player.StaminaAmount.Value <= 0 then
                Player.StaminaAmount.Value = 0
                Player.Character.Humanoid.WalkSpeed = 16
                Running = false
                StaminaRegen()
            end
            
            task.wait(0.5)
        end
    end
end

end)

UIS.InputEnded:Connect(function(input, Processed)
if input.UserInputType == Enum.UserInputType.Keyboard and not Processed then
if input.KeyCode == Enum.KeyCode.LeftShift then
Player.Character.Humanoid.WalkSpeed = 16
Running = false
StaminaRegen()
end
end
end)

local BreakLoop = false

CoreEvent.OnClientEvent:Connect(function(eventtype, Arg1, Arg2)
if eventtype == "Round" then
local RoundType = Arg1

    if RoundType == "Start" then
        local Duration = Arg2
        
        CoreGUI.RoundFrame.RoundTextLabel.text = "Round Starting in "
        for i = Duration, 0, -1 do
            if BreakLoop then
                coreGUI.RoundFrame.RoundTextLabel.Text = "Waiting for more players..."
                coreGUI.RoundFrame.CountdownTextLabel.Text = ""
                BreakLoop = false
                break
            end
            
            coreGUI.RoundFrame.RoundTextLabel.Text = i
            
            task.wait(1)
        end
    elseif RoundType == "Clear" then
        BreakLoop = true
    elseif RoundType == "In Progress" then
        local Duration = Arg2
        coreGUI.RoundFrame.RoundTextLabel.Text = "Round Ending in:"
        
        for i = Duration, 0, -1 do
            if BreakLoop then
                coreGUI.RoundFrame.RoundTextLabel.Text = "Round Starting soon..."
                coreGUI.RoundFrame.CountdownTextLabel.Text = ""
                BreakLoop = false
                break
            end
            
            local Minutes = math.floor(i/60)
            local Seconds = i%60
            local Time = string.format("%02d:%02d", Minutes, Seconds)
            
            coreGUI.RoundFrame.RoundTextLabel.Text = Time

            task.wait(1)
        end
    end
end

end)

#

PLEAS SOMEONE HELP

hallow marsh
#

uhhh

#

i can help

#

but

#

you hav to tell me

#

what doesnt work and what works

#

so i can fix that

obsidian oar
#

I know stamina does not work like it doesn’t go down. I don’t know if it would regenerate anything because I can’t test that because I can’t make this time and go down and I also can’t test the health system because I don’t have any way of dealing damage to the player yet

#

😭 😅

hallow marsh
#

is there any errors

#

printed out in console?

obsidian oar
#

I don't think so but just in case I'm confused how do I check

hallow marsh
#

uhh

obsidian oar
#

I think I’m looking in the right spot, but I’m not 100% sure

hallow marsh
#

you run the game

#

and press f9

#

and screenshot it to me

obsidian oar
hallow marsh
#

there i see

#

on your first two lines

#

you used ‘ . ‘ instead of ‘ : ‘

#

(btw it can be done with ‘ . ‘ by using ‘ self ‘ but just ignore this bro, trying to understand this MUST confuse you)

#

just replace that . with : ok?

obsidian oar
#

local PS = game:GetService("Players")
local TS = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local Player = game.players.LocalPlayer
local CoreGUI = Player.PlayerGui:WaitForChild("CoreGUI")

opal finchBOT
#

studio** You are now Level 1! **studio

obsidian oar
#

that better?

hallow marsh
#

bro

#

uhh

#

you see the line

#

starting with ‘local Player = ‘

#

you literally did game.players

#

but you need the letter to be capital

#

game.Players.LocalPlayer

#

ok?

hallow marsh
#

you MUST do it in order to manage it to work

obsidian oar
#

local PS = game:GetService("Players")
local TS = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local Player = game.Players.LocalPlayer
local CoreGUI = Player.PlayerGui:WaitForChild("CoreGUI")

#

is that right?

hallow marsh
#

yes

#

i see no errors on the code

#

that u just showed to me

obsidian oar
#

Kk

#

Btw it still not working XX

hallow marsh
#

does it print

obsidian oar
#

😭

hallow marsh
#

infinite yield thing

#

with yellow

#

still?

#

look at console

#

i mean

obsidian oar
hallow marsh
#

f9

#

yeah

#

i see

#

show me your explorer

#

it’s on your right of the screen

obsidian oar
#

my what XX

hallow marsh
#

right side

#

screenshot it to me

obsidian oar
#

this?

hallow marsh
#

yes

#

press that

#

uhh

#

|> button

#

on

#

ReplicatedStorage

#

and screenshot it to me again

obsidian oar
hallow marsh
#

are u serious

#

CoreEvent

#

rename it

hallow marsh
#

this

#

so what :WaitForChild means

#

is

#

it is function

#

that delays your script FOREVER

obsidian oar
#

o.o

hallow marsh
#

until it finds CoreEvent on your replicatedstorage

#

and u named it wrong

obsidian oar
#

im stuped sorry XX

hallow marsh
#

so the script won’t work

#

it’s ok

#

so now

#

if it doesn’t work

#

it’s ok

#

we just have to repeat those steps again and again

#

until it works

obsidian oar
#

😭

hallow marsh
#

SHOW THAT SCRIPT

#

on serverscriptstorage

#

go to line number 54

#

we’re eventually gonna fix it

#

screenshot it

obsidian oar
#

dis one?

#

or dis one?

hallow marsh
#

plr -> Plr

#

on the first screenshot

#

that u sent

obsidian oar
#

shuld i chang all of them to P

opal finchBOT
#

studio** You are now Level 2! **studio

hallow marsh
#

ofcourse bro

obsidian oar
#

why did i mess up so much XX

hallow marsh
#

wait

#

which tutorial

#

did u watch

#

send me link

#

that’s lowkey bad tutorial

#

also

obsidian oar
#

or im just dumb

hallow marsh
#

nah

#

u aint bro

obsidian oar
#

Don't forget to leave a like, subscribe, and find out down below how you can support me further.

Join my discord server: https://discord.gg/KAjdEH3e3n
Join my roblox group: https://www.roblox.com/groups/5821166/No-limit-Projects#!/about

Want access to my scripts/models? (Leave a comment if you have a question)
Become a member of my channel or...

â–¶ Play video
hallow marsh
#

it’s just a phase of evolving

obsidian oar
#

thx XX

hallow marsh
#

i never thought

#

coregui is located in plrgui

#

so wait bro

#

lemme search up

obsidian oar
obsidian oar
hallow marsh
#

oh well

#

dude

hallow marsh
#

find

#

StarterGui here

#

and

#

press that |> again

#

everything inside startergui?

#

and

#

screenshot

obsidian oar
hallow marsh
#

dude i see

#

i see

#

u spelt it wrong again

hallow marsh
#

CoreGui to

#

CoreGUI

#

capital letter

#

gui to GUI

obsidian oar
hallow marsh
#

does it work now

opal finchBOT
#

studio** You are now Level 24! **studio

obsidian oar
#

...

hallow marsh
#

WRONG

#

okay listen carefully

#

playerImageLabel -> PlayerImageLabel

#

do u recognize it?

#

rename it

#

btw don’t worry

#

we’re almost done

obsidian oar
hallow marsh
#

Inpuut

#

began

#

u see why

obsidian oar
#

it dus not end XX

hallow marsh
#

InpuutBegan -> InputBegan

#

there are two ‘u’

obsidian oar
#

wher is it tho?

hallow marsh
#

press ctrl + f

#

i mean

#

open script first

#

and

#

press ctrl+f

#

type UIS

#

then it will show u all

#

and u can find it easily

obsidian oar
#

ok ok it works

#

but ther is still one problem

hallow marsh
#

which

obsidian oar
#

the borr ither dus not work

#

or the part that’s going down is actually the part that is supposed to be the background and that’s the wrong part is going down

#

because I’m not visually able to see the bar running out, but it does still run out apparently because I stopped being able to sprint after a bit

hallow marsh
#

i dont understand

obsidian oar
#

The bar itself doesn’t go down

opal finchBOT
#

studio** You are now Level 3! **studio

obsidian oar
#

The stamina bar

#

and there could be two reason reasons for that

#

either one it just doesn’t go down for whatever reason in the code

#

or two the background of it that is supposed to stay in the same spot is the thing moving instead of the actual part of the bar that’s supposed to move

#

@hallow marsh?

#

so in other words, I think I need to figure out how to change which things on top of the other

#

Nop

#

Nvm

#

The bar doesn’t decrease

#

Ya there?

#

@hallow marsh

obsidian oar
#

😭

sleek vault
# obsidian oar 😭
Player.StaminaAmount.Changed:connect(function()
    local StaminaTween = TS:create(CoreGUI.InfoFrame.CurrentStaminaTextLabel, TweenInfo.new(0.2, Enum.EasingstStyle.Linear, Enum.EasingDirection.out), {Size = UDim2.new(0, Player.StaminaAmount.Value, 0, 25)})
    StaminaTween:Play()
    CoreGUI.InfoFrame.StaminaTextLabel.Text = Player.StaminaAmount.Value.."/100"
end)

local Running = false

local function StaminaRegen()
    while not Running and Player.StaminnaAmount.Value < 100 do
        Player.StaminaAmount.Value += 2

        if Player.StaminaAmount.Value >= 100 then
            Player.StaminaAmount.Value = 100
            break
        end

        task.wait(0.5)
    end
end

Find this code in CoreScript(Local) under StarterPlayer -> StarterPlayerScripts and look at this line

while not Running and Player.StaminnaAmount.Value < 100 do

You put StaminnaAmount instead of StaminaAmount, change that and see if it works

obsidian oar
#

I believe I changed what you were telling me about although I do believe it still does not work XX

obsidian oar
#

I don’t understand if there’s something else you’re telling me to do, but at least from what I read I fixed the stamina amount part

#

@sleek vault hello?

sleek vault
#
Enum.EasingstStyle.Linear

@obsidian oar Look here too, Should be EasingStyle instead of EastingstStyle

#

and change

Enum.EasingDirection.out

to

Enum.EasingDirection.Out
#

It would help if you'd send an updated version of your script

#

Mainly CoreScript

obsidian oar
#

local PS = game:GetService("Players")
local TS = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local Player = game.Players.LocalPlayer
local CoreGUI = Player.PlayerGui:WaitForChild("CoreGUI")

#

CoreGUI.InfoFrame.PlayerImageLabel.Image = PS:GetUserThumbnailAsync( Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size48x48)

Player.HealthAmount.Changed:connect(function()
local HealthTween = TS:create(CoreGUI.InfoFrame.CurrentHealthTextLabel, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = UDim2.new(0, Player.HealthAmount.Value, 0, 25)})
HealthTween:Play()
CoreGUI.InfoFrame.HealthTextLabel.Text = math.round( Player.HealthAmount.Value).."/100"
end)

Player.StaminaAmount.Changed:connect(function()
local StaminaTween = TS:create(CoreGUI.InfoFrame.CurrentStaminaTextLabel, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.)Out), {Size = UDim2.new(0, Player.StaminaAmount.Value, 0, 25)})
StaminaTween:Play()
CoreGUI.InfoFrame.StaminaTextLabel.Text = Player.StaminaAmount.Value.."/100"
end)

local Running = false

local function StaminaRegen()
while not Running and Player.StaminaAmount.Value < 100 do
Player.StaminaAmount.Value += 2

    if Player.StaminaAmount.Value >= 100 then
        Player.StaminaAmount.Value = 100
        break
    end
    
    task.wait(0.5)
end

end

UIS.InputBegan:Connect(function(input, Processed)
if input.UserInputType == Enum.UserInputType.Keyboard and not Processed then
if input.KeyCode == Enum.KeyCode.LeftShift then
Player.Character.Humanoid.WalkSpeed = 32
Running = true

        while Running do
            Player.StaminaAmount.Value -= 2
            
            if Player.StaminaAmount.Value <= 0 then
                Player.StaminaAmount.Value = 0
                Player.Character.Humanoid.WalkSpeed = 16
                Running = false
                StaminaRegen()
            end
            
            task.wait(0.5)
        end
    end
end

end)

UIS.InputEnded:Connect(function(input, Processed)
if input.UserInputType == Enum.UserInputType.Keyboard and not Processed then
if input.KeyCode == Enum.KeyCode.LeftShift then
Player.Character.Humanoid.WalkSpeed = 16
Running = false
StaminaRegen()
end
end
end)

local BreakLoop = false

CoreEvent.OnClientEvent:Connect(function(eventtype, Arg1, Arg2)
if eventtype == "Round" then
local RoundType = Arg1

    if RoundType == "Start" then
        local Duration = Arg2
        
        CoreGUI.RoundFrame.RoundTextLabel.text = "Round Starting in "
        for i = Duration, 0, -1 do
            if BreakLoop then
                coreGUI.RoundFrame.RoundTextLabel.Text = "Waiting for more players..."
                coreGUI.RoundFrame.CountdownTextLabel.Text = ""
                BreakLoop = false
                break
            end
            
            coreGUI.RoundFrame.RoundTextLabel.Text = i
            
            task.wait(1)
        end
    elseif RoundType == "Clear" then
        BreakLoop = true
    elseif RoundType == "In Progress" then
        local Duration = Arg2
        coreGUI.RoundFrame.RoundTextLabel.Text = "Round Ending in:"
        
        for i = Duration, 0, -1 do
            if BreakLoop then
                coreGUI.RoundFrame.RoundTextLabel.Text = "Round Starting soon..."
                coreGUI.RoundFrame.CountdownTextLabel.Text = ""
                BreakLoop = false
                break
            end
            
            local Minutes = math.floor(i/60)
            local Seconds = i%60
            local Time = string.format("%02d:%02d", Minutes, Seconds)
            
            coreGUI.RoundFrame.RoundTextLabel.Text = Time

            task.wait(1)
        end
    end
end

end)

sleek vault
#

It has to match the variable name at the top of the script:

local CoreGUI = Player.PlayerGui:WaitForChild("CoreGUI")
obsidian oar
#

I think I got them

#

now there’s an entire line and it wasn’t from fixing this error, but from some point a line that I’m pretty sure it didn’t have it before now has a red squiggly line across the entire thing

#

17

sleek vault
opal finchBOT
#

studio** You are now Level 1! **studio

obsidian oar
sleek vault
# obsidian oar

Remove the ) from

Enum.EasingDirection.)Out)

the one after the .

obsidian oar
#

Got it

#

IT WORKS

#

FINALLY

#

THX

#

how do I do something that requires two players to be on?

#

Do you know @sleek vault

#

?

silent jacinth
#

check

#
if #Players:GetPlayers > 1 then
    -- code runs here
end
opal finchBOT
#

studio** You are now Level 3! **studio

sleek vault
#

You'd need to show me what your UI looks like in case you're not using the same one as me

obsidian oar
#

i’m sorry I’m not 100% sure what a drop-down is in the situation

#

O I think I’ve might’ve found this maybe

sleek vault
#

'Test'

obsidian oar
#

OK, yeah and I clicked team test, right

sleek vault
obsidian oar
#

O ok

sleek vault
#

You use team test if you're testing with another human

obsidian oar
#

O ok

opal finchBOT
#

studio** You are now Level 4! **studio

obsidian oar
silent jacinth
#

click on this arrow

obsidian oar
#

O thx

silent jacinth
#

to manage the number of players

#

make it bigger

#

or smaller

#

np

obsidian oar
#

thank you so much guys, but it also seems to have another problem because I suck at doing this apparently

#

This will probably help you guys try and figure out what I’m trying to do in the first place I am attempting to make a game similar to that of "forsaken"

#

not because of forsaken specifically, but that’s just the first one that came to my mind isn’t an example

#

and that’s why I wanted to test two players because it requires two players to actually start a match

#

Butttttt

#

it does not seem to be starting the match or doing literally anything other than just having me and my clone inside the game at once

#

But still a spectator

#

@sleek vault or @silent jacinth 😭

silent jacinth
#

uh

#

that's hard

#

making a whole forskaen game

obsidian oar
#

that kind of genre specifically not that specific game necessarily

#

but I was watching a tutorial and I don’t know how I missed it up that bad in which like half the things didn’t work

#

there’s probably just more spelling errors or something

silent jacinth
#

don't watch tutorials for whole games types

#

they are usually bad

obsidian oar
#

not for a whole game just for the picking system and the base startup

#

especially cause I don’t know how to do it’s properly

silent jacinth
#

oh

obsidian oar
#

so now I need to make it where the players win there’s enough of them will actually get sent into the game, although technically there’s not a game yet, but I will change their role and bring them to the right spot, but not even the counter starts or anything

#

Do you know why XX

silent jacinth
#

I need the server code

obsidian oar
#

The what?

silent jacinth
#

oh why I read it wrong

#

mb

obsidian oar
#

O ok

silent jacinth
#

so

#

for that you need to learn scripting

#

because

#

yes

#

here's some resources to help you learn

#
obsidian oar
#

Kk

#

Thx

#

Watch those in a second

#

but but still, the question from before is still very much existing of do you know how and if I can even start looking for the problem is why it won’t send us in the game

#

@silent jacinth

sleek vault
obsidian oar
#

It don't come up in the first place XX

obsidian oar
#

XX

obsidian oar
#

@sleek vault?

#

Or @silent jacinth

#

Or even @hallow marsh

#

Or anyone

silent jacinth
#

u need to code server code

obsidian oar
#

What....?

silent jacinth
#

u know what the server and client is?

obsidian oar
#

Ta

opal finchBOT
#

studio** You are now Level 5! **studio

obsidian oar
#

Ya*

silent jacinth
#

and you know what a server script is?

#

nvm

#

basically you need the server to handle that

obsidian oar
#

I don’t know if that is necessarily the problem. I’m facing right now. I think the problem I’m facing has something to do with the code itself like the rest of everything that was wrong.

#

I would think at least

silent jacinth
#

oh

#

i need to see the server code

#

to check what its doing

obsidian oar
#

idk

#

😭

silent jacinth
#

server script

obsidian oar
#

how do I find it?

silent jacinth
#

did you only make a client script

obsidian oar
#

Idk

#

XX

silent jacinth
#

what script did you make then?

obsidian oar
#

does this answer your question? I really don’t know

silent jacinth
#

what

obsidian oar
#

Idk

silent jacinth
#

...

#

wait

#

where did you get the ui from

#

actually what youtube tutorial did you follow

silent jacinth
#

alright

#

so

#

you followed both parts?

obsidian oar
#

The whole of the first video

#

I only watched that video

#

would I believe the issue is is probably just spelling errors like in the first part that you guys helped me fix

silent jacinth
#

ok

#

go to corescript(server)

#

and

#

send the code

obsidian oar
#

?

obsidian oar
obsidian oar
#

@silent jacinth

silent jacinth
#

sorry

obsidian oar
#

?

silent jacinth
#

can you send the script

#

with the name

#

corescript(server)

obsidian oar
#

I believe it's this one?

#

local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local RoundStarted= false

local function StartRound()
CoreEvent:FireAllClients("Round", "Start", 45)

for i = 45, 0, -1 do
    local NumberOfPlayers = #game.Players:GetChildren()
    
    if NumberOfPlayers < 2 then
        CoreEvent:FireAllClients("Round", "Clear")
        RoundStarted = false
        break
    end
    
    if i == 0 then
        local UserNumeList = {}
        
        for i,v in pairs(game.Players:GetChildren()) do
            table.insert(UserNumeList, v.Name)
        end
        
        local     RandomNumber = math.random(1, #UserNumeList)
        local     RandomUsername = UserNumeList[RandomNumber]
        local     Killer = game.Players:FindFirstChild(RandomUsername)
        
        Killer.Team = game.Teams.Killer
        Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
        
        for i,v in pairs(game.Players:GetChildren()) do
            if v.Name ~= RandomUsername then
                v.Team = game.Teams.Survivor
                v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
            end
        end
        
        CoreEvent:FireAllClients("Round", "In Progress", 180)
    end
    
task.wait(1)
end

end

game.Players.PlayerAdded:Connect(function(Plr)
local HealthAmount = Instance.new("NumberValue")
HealthAmount.Name = "HealthAmount"
HealthAmount.Value = 100
HealthAmount.Parent = Plr
local StaminaAmount = Instance.new("NumberValue")
StaminaAmount.Name = "StaminaAmount"
StaminaAmount.Value = 100
StaminaAmount.Parent = Plr

Plr.CharacterAdded:Connect(function(character)
    character.Humanoid.HealthChanged:Connect(function()
        Plr.HealthAmount.Value = character.Humanoid.Health
    end)
    
    character.Humanoid.Died:Connect(function()
        Plr.Team = game.Teams.Spectators
    end)
end)

if not RoundStarted then
    local NumberOfPlayers = #game.Players:GetChildren()
    
    if NumberOfPlayers > 1 then
        RoundStarted = true
        StartRound()
    end
end

end)

silent jacinth
#

issue

#

actually

#

can you put your code in between
```
code
```

obsidian oar
#

In what?

silent jacinth
#

uh

#

wiat

silent jacinth
#

so i can read

#

if u can

#

nvm

#

so theres a few problems

obsidian oar
#

'''

silent jacinth
#

no

#

like this

obsidian oar
#

local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local RoundStarted= false

local function StartRound()
CoreEvent:FireAllClients("Round", "Start", 45)

for i = 45, 0, -1 do
    local NumberOfPlayers = #game.Players:GetChildren()
    
    if NumberOfPlayers < 2 then
        CoreEvent:FireAllClients("Round", "Clear")
        RoundStarted = false
        break
    end
    
    if i == 0 then
        local UserNumeList = {}
        
        for i,v in pairs(game.Players:GetChildren()) do
            table.insert(UserNumeList, v.Name)
        end
        
        local     RandomNumber = math.random(1, #UserNumeList)
        local     RandomUsername = UserNumeList[RandomNumber]
        local     Killer = game.Players:FindFirstChild(RandomUsername)
        
        Killer.Team = game.Teams.Killer
        Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
        
        for i,v in pairs(game.Players:GetChildren()) do
            if v.Name ~= RandomUsername then
                v.Team = game.Teams.Survivor
                v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
            end
        end
        
        CoreEvent:FireAllClients("Round", "In Progress", 180)
    end
    
task.wait(1)
end

end

game.Players.PlayerAdded:Connect(function(Plr)
local HealthAmount = Instance.new("NumberValue")
HealthAmount.Name = "HealthAmount"
HealthAmount.Value = 100
HealthAmount.Parent = Plr
local StaminaAmount = Instance.new("NumberValue")
StaminaAmount.Name = "StaminaAmount"
StaminaAmount.Value = 100
StaminaAmount.Parent = Plr

Plr.CharacterAdded:Connect(function(character)
    character.Humanoid.HealthChanged:Connect(function()
        Plr.HealthAmount.Value = character.Humanoid.Health
    end)
    
    character.Humanoid.Died:Connect(function()
        Plr.Team = game.Teams.Spectators
    end)
end)

if not RoundStarted then
    local NumberOfPlayers = #game.Players:GetChildren()
    
    if NumberOfPlayers > 1 then
        RoundStarted = true
        StartRound()
    end
end

end)

#

'''

silent jacinth
#

`

#

nvm

obsidian oar
#

'local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local RoundStarted= false

local function StartRound()
CoreEvent:FireAllClients("Round", "Start", 45)

for i = 45, 0, -1 do
    local NumberOfPlayers = #game.Players:GetChildren()
    
    if NumberOfPlayers < 2 then
        CoreEvent:FireAllClients("Round", "Clear")
        RoundStarted = false
        break
    end
    
    if i == 0 then
        local UserNumeList = {}
        
        for i,v in pairs(game.Players:GetChildren()) do
            table.insert(UserNumeList, v.Name)
        end
        
        local     RandomNumber = math.random(1, #UserNumeList)
        local     RandomUsername = UserNumeList[RandomNumber]
        local     Killer = game.Players:FindFirstChild(RandomUsername)
        
        Killer.Team = game.Teams.Killer
        Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
        
        for i,v in pairs(game.Players:GetChildren()) do
            if v.Name ~= RandomUsername then
                v.Team = game.Teams.Survivor
                v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
            end
        end
        
        CoreEvent:FireAllClients("Round", "In Progress", 180)
    end
    
task.wait(1)
end

end

game.Players.PlayerAdded:Connect(function(Plr)
local HealthAmount = Instance.new("NumberValue")
HealthAmount.Name = "HealthAmount"
HealthAmount.Value = 100
HealthAmount.Parent = Plr
local StaminaAmount = Instance.new("NumberValue")
StaminaAmount.Name = "StaminaAmount"
StaminaAmount.Value = 100
StaminaAmount.Parent = Plr

Plr.CharacterAdded:Connect(function(character)
    character.Humanoid.HealthChanged:Connect(function()
        Plr.HealthAmount.Value = character.Humanoid.Health
    end)
    
    character.Humanoid.Died:Connect(function()
        Plr.Team = game.Teams.Spectators
    end)
end)

if not RoundStarted then
    local NumberOfPlayers = #game.Players:GetChildren()
    
    if NumberOfPlayers > 1 then
        RoundStarted = true
        StartRound()
    end
end

end)'

silent jacinth
#
local RoundStarted= false

local function StartRound()
    CoreEvent:FireAllClients("Round", "Start", 45)
    
    for i = 45, 0, -1 do
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers < 2 then
            CoreEvent:FireAllClients("Round", "Clear")
            RoundStarted = false
            break
        end
        
        if i == 0 then
            local UserNumeList = {}
            
            for i,v in pairs(game.Players:GetChildren()) do
                table.insert(UserNumeList, v.Name)
            end
            
            local     RandomNumber = math.random(1, #UserNumeList)
            local     RandomUsername = UserNumeList[RandomNumber]
            local     Killer = game.Players:FindFirstChild(RandomUsername)
            
            Killer.Team = game.Teams.Killer
            Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
            
            for i,v in pairs(game.Players:GetChildren()) do
                if v.Name ~= RandomUsername then
                    v.Team = game.Teams.Survivor
                    v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
                end
            end
            
            CoreEvent:FireAllClients("Round", "In Progress", 180)
        end
        
    task.wait(1)
    end
end

game.Players.PlayerAdded:Connect(function(Plr)
    local HealthAmount = Instance.new("NumberValue")
    HealthAmount.Name = "HealthAmount"
    HealthAmount.Value = 100
    HealthAmount.Parent = Plr
    local StaminaAmount = Instance.new("NumberValue")
    StaminaAmount.Name = "StaminaAmount"
    StaminaAmount.Value = 100
    StaminaAmount.Parent = Plr
    
    Plr.CharacterAdded:Connect(function(character)
        character.Humanoid.HealthChanged:Connect(function()
            Plr.HealthAmount.Value = character.Humanoid.Health
        end)
        
        character.Humanoid.Died:Connect(function()
            Plr.Team = game.Teams.Spectators
        end)
    end)
    
    if not RoundStarted then
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers > 1 then
            RoundStarted = true
            StartRound()
        end
    end
end)```
opal finchBOT
#

studio** You are now Level 5! **studio

obsidian oar
silent jacinth
#

like this

obsidian oar
#

?

obsidian oar
silent jacinth
#

I'ma just

#

brb

obsidian oar
#

Kk

obsidian oar
#

Bro ant coming back

#

@ why you pull or dis move

obsidian oar
#

@silent jacinth you lied and betrayed me 😭 XX XD

sleek vault
# obsidian oar ?

Send your code with three of these symbols ` followed by lua at the start of the code, and three at the end

like this

obsidian oar
#

'''lua'''

#

cat

opal finchBOT
#

studio** You are now Level 6! **studio

obsidian oar
#

Oooo

#
local RoundStarted= false

local function StartRound()
    CoreEvent:FireAllClients("Round", "Start", 45)
    
    for i = 45, 0, -1 do
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers < 2 then
            CoreEvent:FireAllClients("Round", "Clear")
            RoundStarted = false
            break
        end
        
        if i == 0 then
            local UserNumeList = {}
            
            for i,v in pairs(game.Players:GetChildren()) do
                table.insert(UserNumeList, v.Name)
            end
            
            local     RandomNumber = math.random(1, #UserNumeList)
            local     RandomUsername = UserNumeList[RandomNumber]
            local     Killer = game.Players:FindFirstChild(RandomUsername)
            
            Killer.Team = game.Teams.Killer
            Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
            
            for i,v in pairs(game.Players:GetChildren()) do
                if v.Name ~= RandomUsername then
                    v.Team = game.Teams.Survivor
                    v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
                end
            end
            
            CoreEvent:FireAllClients("Round", "In Progress", 180)
        end
        
    task.wait(1)
    end
end

game.Players.PlayerAdded:Connect(function(Plr)
    local HealthAmount = Instance.new("NumberValue")
    HealthAmount.Name = "HealthAmount"
    HealthAmount.Value = 100
    HealthAmount.Parent = Plr
    local StaminaAmount = Instance.new("NumberValue")
    StaminaAmount.Name = "StaminaAmount"
    StaminaAmount.Value = 100
    StaminaAmount.Parent = Plr
    
    Plr.CharacterAdded:Connect(function(character)
        character.Humanoid.HealthChanged:Connect(function()
            Plr.HealthAmount.Value = character.Humanoid.Health
        end)
        
        character.Humanoid.Died:Connect(function()
            Plr.Team = game.Teams.Spectators
        end)
    end)
    
    if not RoundStarted then
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers > 1 then
            RoundStarted = true
            StartRound()
        end
    end
end)' 
sleek vault
obsidian oar
sleek vault
#

making it even easier to read

obsidian oar
#
local RoundStarted= false

local function StartRound()
    CoreEvent:FireAllClients("Round", "Start", 45)
    
    for i = 45, 0, -1 do
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers < 2 then
            CoreEvent:FireAllClients("Round", "Clear")
            RoundStarted = false
            break
        end
        
        if i == 0 then
            local UserNumeList = {}
            
            for i,v in pairs(game.Players:GetChildren()) do
                table.insert(UserNumeList, v.Name)
            end
            
            local     RandomNumber = math.random(1, #UserNumeList)
            local     RandomUsername = UserNumeList[RandomNumber]
            local     Killer = game.Players:FindFirstChild(RandomUsername)
            
            Killer.Team = game.Teams.Killer
            Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
            
            for i,v in pairs(game.Players:GetChildren()) do
                if v.Name ~= RandomUsername then
                    v.Team = game.Teams.Survivor
                    v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
                end
            end
            
            CoreEvent:FireAllClients("Round", "In Progress", 180)
        end
        
    task.wait(1)
    end
end

game.Players.PlayerAdded:Connect(function(Plr)
    local HealthAmount = Instance.new("NumberValue")
    HealthAmount.Name = "HealthAmount"
    HealthAmount.Value = 100
    HealthAmount.Parent = Plr
    local StaminaAmount = Instance.new("NumberValue")
    StaminaAmount.Name = "StaminaAmount"
    StaminaAmount.Value = 100
    StaminaAmount.Parent = Plr
    
    Plr.CharacterAdded:Connect(function(character)
        character.Humanoid.HealthChanged:Connect(function()
            Plr.HealthAmount.Value = character.Humanoid.Health
        end)
        
        character.Humanoid.Died:Connect(function()
            Plr.Team = game.Teams.Spectators
        end)
    end)
    
    if not RoundStarted then
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers > 1 then
            RoundStarted = true
            StartRound()
        end
    end
end)
sleek vault
#

don't put a space, and keep it lowercased

opal finchBOT
#

studio** You are now Level 2! **studio

obsidian oar
#
local RoundStarted= false

local function StartRound()
    CoreEvent:FireAllClients("Round", "Start", 45)
    
    for i = 45, 0, -1 do
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers < 2 then
            CoreEvent:FireAllClients("Round", "Clear")
            RoundStarted = false
            break
        end
        
        if i == 0 then
            local UserNumeList = {}
            
            for i,v in pairs(game.Players:GetChildren()) do
                table.insert(UserNumeList, v.Name)
            end
            
            local     RandomNumber = math.random(1, #UserNumeList)
            local     RandomUsername = UserNumeList[RandomNumber]
            local     Killer = game.Players:FindFirstChild(RandomUsername)
            
            Killer.Team = game.Teams.Killer
            Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
            
            for i,v in pairs(game.Players:GetChildren()) do
                if v.Name ~= RandomUsername then
                    v.Team = game.Teams.Survivor
                    v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
                end
            end
            
            CoreEvent:FireAllClients("Round", "In Progress", 180)
        end
        
    task.wait(1)
    end
end

game.Players.PlayerAdded:Connect(function(Plr)
    local HealthAmount = Instance.new("NumberValue")
    HealthAmount.Name = "HealthAmount"
    HealthAmount.Value = 100
    HealthAmount.Parent = Plr
    local StaminaAmount = Instance.new("NumberValue")
    StaminaAmount.Name = "StaminaAmount"
    StaminaAmount.Value = 100
    StaminaAmount.Parent = Plr
    
    Plr.CharacterAdded:Connect(function(character)
        character.Humanoid.HealthChanged:Connect(function()
            Plr.HealthAmount.Value = character.Humanoid.Health
        end)
        
        character.Humanoid.Died:Connect(function()
            Plr.Team = game.Teams.Spectators
        end)
    end)
    
    if not RoundStarted then
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers > 1 then
            RoundStarted = true
            StartRound()
        end
    end
end)
sleek vault
#

Almost, you just need to put your code on a new line

obsidian oar
#

O ok

#
local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local RoundStarted= false

local function StartRound()
    CoreEvent:FireAllClients("Round", "Start", 45)
    
    for i = 45, 0, -1 do
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers < 2 then
            CoreEvent:FireAllClients("Round", "Clear")
            RoundStarted = false
            break
        end
        
        if i == 0 then
            local UserNumeList = {}
            
            for i,v in pairs(game.Players:GetChildren()) do
                table.insert(UserNumeList, v.Name)
            end
            
            local     RandomNumber = math.random(1, #UserNumeList)
            local     RandomUsername = UserNumeList[RandomNumber]
            local     Killer = game.Players:FindFirstChild(RandomUsername)
            
            Killer.Team = game.Teams.Killer
            Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
            
            for i,v in pairs(game.Players:GetChildren()) do
                if v.Name ~= RandomUsername then
                    v.Team = game.Teams.Survivor
                    v.Character:PivotTo(workspace.SurvivorSpawn.CFrame)
                end
            end
            
            CoreEvent:FireAllClients("Round", "In Progress", 180)
        end
        
    task.wait(1)
    end
end

game.Players.PlayerAdded:Connect(function(Plr)
    local HealthAmount = Instance.new("NumberValue")
    HealthAmount.Name = "HealthAmount"
    HealthAmount.Value = 100
    HealthAmount.Parent = Plr
    local StaminaAmount = Instance.new("NumberValue")
    StaminaAmount.Name = "StaminaAmount"
    StaminaAmount.Value = 100
    StaminaAmount.Parent = Plr
    
    Plr.CharacterAdded:Connect(function(character)
        character.Humanoid.HealthChanged:Connect(function()
            Plr.HealthAmount.Value = character.Humanoid.Health
        end)
        
        character.Humanoid.Died:Connect(function()
            Plr.Team = game.Teams.Spectators
        end)
    end)
    
    if not RoundStarted then
        local NumberOfPlayers = #game.Players:GetChildren()
        
        if NumberOfPlayers > 1 then
            RoundStarted = true
            StartRound()
        end
    end
end)
sleek vault
#

perfect

obsidian oar
#

Dis?

sleek vault
#

what is the issue again?

obsidian oar
#

it won’t start the round or do anything when there’s two players in the lobby

sleek vault
#

ok let me look

#

im kinda busy right now too

obsidian oar
#

but it’s supposed to set one player to be a killer and everyone else to be a survivor change their teams and teleport them to their equivalent spawn platform

obsidian oar
obsidian oar
sleek vault
obsidian oar
#

No it stays blank no matter what I think

sleek vault
obsidian oar
#

I don't think so and I’m pretty sure I checked, but it's not in front of me and I won’t be able to check in a while

#

XX

sleek vault
#

It's hard to help without the whole codebase tbh

obsidian oar
sleek vault
# obsidian oar The what?

I'd need to see the whole hierarchy in your explorer (where workspace, players, lighting, StarterPlayerScripts etc. are) as well as every script to find the issue

#

If the GUI isn't popping up, it's possible that your hierarchy isn't set up properly

digital pond
digital pond
obsidian oar
obsidian oar
#

@sleek vault

#

Are either a you der

obsidian oar
#

@digital pond

silent jacinth
#

yo

#

im here

#

wait 1 sec

#

im fixing the script

#

cuz its very bad

#

idk who made the tutorial

#

but its bad

#

local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local RoundStarted= false
local Killer = nil

local function StartRound()
CoreEvent:FireAllClients("Round", "Start", 45)
killer = Players:GetPlayers()[math.random(1,#Players:GetPlayers())]
Killer.Team = Teams.Killer
Killer.Character:PivotTo(workspace.KillerSpawn.CFrame)
for _,players in pairs(Players:GetPlayers()) do
if v == killer then
continue
end
v.Team = Teams.Survivor
v.Character:SetPrimaryPartCFrame(workspace.SurvivorSpawn.CFrame) + Vector3.new(0,1,0)
end
local NumberOfPlayers = #Players:GetPlayers()
CoreEvent:FireAllClients("Round", "In Progress", 180)
for i = 45, 0, -1 do
if NumberOfPlayers < 2 then
CoreEvent:FireAllClients("Round", "Clear")
RoundStarted = false
break
end

task.wait(1)
end

end

Players.PlayerAdded:Connect(function(Plr)
Plr.CharacterAdded:Connect(function(character)
character.Humanoid.Died:Connect(function()
Plr.Team = game.Teams.Spectators
end)
end)

if not RoundStarted then
local NumberOfPlayers = #Players:GetPlayers()
if NumberOfPlayers > 1 then
StartRound()
end
end

end)

#

in corescript(server)

obsidian oar
silent jacinth
#

yes

#

MAKE SURE

#

It's corescript(server)

obsidian oar
#

Kk

silent jacinth
#

also

obsidian oar
#

But wen I do it ther are a bunch of red lines

silent jacinth
#

leme see

obsidian oar
#

Must I send a screen shot?

silent jacinth
#

ye

obsidian oar
#

O whit

#

I then that gon now?

silent jacinth
#

what?

#

send the screenshot here

obsidian oar
silent jacinth
#

oh

#

replace text with Text

obsidian oar
#

where?

silent jacinth
#

line 78

#

also are you in roblox studio?

silent jacinth
obsidian oar
#

XX

silent jacinth
#

corescript(client)

obsidian oar
#

2 things

#

one it dus not tart on the timer ending and 2

#

is it not sapost to make the (cerintly blank) texlable go down (the one in the yellow box)

silent jacinth
#

can you send the corescript(client)

obsidian oar
#

corescript(local)?

silent jacinth
#

yes

obsidian oar
#

local PS = game:GetService("Players")
local TS = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
local CoreEvent = game.ReplicatedStorage:WaitForChild("CoreEvent")
local Player = game.Players.LocalPlayer
local CoreGUI = Player.PlayerGui:WaitForChild("CoreGUI")

CoreGUI.InfoFrame.PlayerImageLabel.Image = PS:GetUserThumbnailAsync( Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size48x48)

Player.HealthAmount.Changed:connect(function()
local HealthTween = TS:create(CoreGUI.InfoFrame.CurrentHealthTextLabel, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = UDim2.new(0, Player.HealthAmount.Value, 0, 25)})
HealthTween:Play()
CoreGUI.InfoFrame.HealthTextLabel.Text = math.round( Player.HealthAmount.Value).."/100"
end)

#

Player.StaminaAmount.Changed:connect(function()
local StaminaTween = TS:create(CoreGUI.InfoFrame.CurrentStaminaTextLabel, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = UDim2.new(0, Player.StaminaAmount.Value, 0, 25)})
StaminaTween:Play()
CoreGUI.InfoFrame.StaminaTextLabel.Text = Player.StaminaAmount.Value.."/100"
end)

local Running = false

local function StaminaRegen()
while not Running and Player.StaminaAmount.Value < 100 do
Player.StaminaAmount.Value += 2

    if Player.StaminaAmount.Value >= 100 then
        Player.StaminaAmount.Value = 100
        break
    end
    
    task.wait(1)
end

end

UIS.InputBegan:Connect(function(input, Processed)
if input.UserInputType == Enum.UserInputType.Keyboard and not Processed then
if input.KeyCode == Enum.KeyCode.LeftShift then
Player.Character.Humanoid.WalkSpeed = 32
Running = true

        while Running do
            Player.StaminaAmount.Value -= 1
            
            if Player.StaminaAmount.Value <= 0 then
                Player.StaminaAmount.Value = 0
                Player.Character.Humanoid.WalkSpeed = 16
                Running = false
                StaminaRegen()
            end
            
            task.wait(0.1)
        end
    end
end

end)

UIS.InputEnded:Connect(function(input, Processed)
if input.UserInputType == Enum.UserInputType.Keyboard and not Processed then
if input.KeyCode == Enum.KeyCode.LeftShift then
Player.Character.Humanoid.WalkSpeed = 16
Running = false
StaminaRegen()
end
end
end)

local BreakLoop = false

CoreEvent.OnClientEvent:Connect(function(eventtype, Arg1, Arg2)
if eventtype == "Round" then
local RoundType = Arg1

    if RoundType == "Start" then
        local Duration = Arg2
        
        CoreGUI.RoundFrame.RoundTextLabel.Text = "Round Starting in "
        for i = Duration, 0, -1 do
            if BreakLoop then
                CoreGUI.RoundFrame.RoundTextLabel.Text = "Waiting for more players..."
                CoreGUI.RoundFrame.CountdownTextLabel.Text = ""
                BreakLoop = false
                break
            end
            
            CoreGUI.RoundFrame.RoundTextLabel.Text = i
            
            task.wait(1)
        end
    elseif RoundType == "Clear" then
        BreakLoop = true
    elseif RoundType == "In Progress" then
        local Duration = Arg2
        CoreGUI.RoundFrame.RoundTextLabel.Text = "Round Ending in:"
        
        for i = Duration, 0, -1 do
            if BreakLoop then
                CoreGUI.RoundFrame.RoundTextLabel.Text = "Round Starting soon..."
                CoreGUI.RoundFrame.CountdownTextLabel.Text = ""
                BreakLoop = false
                break
            end
            
            local Minutes = math.floor(i/60)
            local Seconds = i%60
            local Time = string.format("%02d:%02d", Minutes, Seconds)
            
            CoreGUI.RoundFrame.RoundTextLabel.Text = Time

            task.wait(1)
        end
    end
end

end)

#

btw what is dis?

silent jacinth
#

breakpoints

#

makes your game stop

#

u can right click -> delete them
to delete them

obsidian oar
#

O ok

obsidian oar
#

@silent jacinth?

#

😭

silent jacinth
#

wait

#

i think

#

but

#

how is the text supposed to look like?

#

like 01:20

#

?

#

oh

obsidian oar
#

I am not sure... I would’ve gone back and fixed it and try to change it to make it more customized but remember I was following a tutorial

silent jacinth
#

yes

obsidian oar
opal finchBOT
#

studio** You are now Level 7! **studio

obsidian oar
#

I will look apart that turns into a countdown was supposed to say starting match in, however, many seconds or something like that and then the one underneath it was supposed to actually do the countdown

#

😭

obsidian oar
silent jacinth
#

dm me

obsidian oar
#

Kk

obsidian oar
#

IT IS FIXED
all i need it so fix the "watign for more playes" thing to chang to starting soon insted of a count doun and make the othertext lable do that
and make it so wen the mach is in progers it sys mach in progeras at the top
but it alredy has the botom one doing the cihnt down after the mach starts

#

THX

#

@sleek vault

obsidian oar