#Hi i don't know why this does not work and what the problem is or could
1 messages · Page 1 of 1 (latest)
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
uhhh
i can help
but
you hav to tell me
what doesnt work and what works
so i can fix that
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
😠😅
I don't think so but just in case I'm confused how do I check
uhh
I think I’m looking in the right spot, but I’m not 100% sure
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?
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")
** You are now Level 1! **
that better?
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?
also it isnt about better or worser
you MUST do it in order to manage it to 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")
is that right?
does it print
ðŸ˜
my what XX
yes
press that
uhh
|> button
on
ReplicatedStorage
and screenshot it to me again
exactly
this
so what :WaitForChild means
is
it is function
that delays your script FOREVER
o.o
im stuped sorry XX
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
SHOW THAT SCRIPT
on serverscriptstorage
go to line number 54
we’re eventually gonna fix it
screenshot it
shuld i chang all of them to P
** You are now Level 2! **
ofcourse bro
wait
which tutorial
did u watch
send me link
that’s lowkey bad tutorial
also
or im just dumb
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...
it’s just a phase of evolving
thx XX
im better at at using Gdevelop to make actual games XX
kk
can u
find
StarterGui here
and
press that |> again
everything inside startergui?
and
screenshot
ya
does it work now
** You are now Level 24! **
YOU SPELT IT
WRONG
okay listen carefully
playerImageLabel -> PlayerImageLabel
do u recognize it?
rename it
btw don’t worry
we’re almost done
it dus not end XX
wher is it tho?
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
which
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
i dont understand
The bar itself doesn’t go down
** You are now Level 3! **
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
ðŸ˜
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
I believe I changed what you were telling me about although I do believe it still does not work XX
.
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?
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
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)
There's alot of coreGui's that need to be CoreGUI
It has to match the variable name at the top of the script:
local CoreGUI = Player.PlayerGui:WaitForChild("CoreGUI")
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
Okay, launch the game and check for anything in F9
** You are now Level 1! **
Can you send a screenshot please
Remove the ) from
Enum.EasingDirection.)Out)
the one after the .
Got it
IT WORKS
FINALLY
THX
how do I do something that requires two players to be on?
Do you know @sleek vault
?
** You are now Level 3! **
If you're on about a team test, you need to click the dropdown in the top left, and choose 'Server & Clients' then you can choose how many players to test with, and it will open multiple studio's
You'd need to show me what your UI looks like in case you're not using the same one as me
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
OK, yeah and I clicked team test, right
Click 'Server & Clients'
O ok
You use team test if you're testing with another human
O ok
** You are now Level 4! **
Then?
O thx
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 ðŸ˜
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
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
oh
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
I need the server code
The what?
O ok
so
for that you need to learn scripting
because
yes
here's some resources to help you learn
Roblox Beginners Scripting Tutorial Guide (2025)
In this 2025 Guide to Roblox Scripting for Beginners, I will go through everything you need to know to start scripting/game development on Roblox!My mission ...
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
check F9 after the 'round starts in:' ends
It don't come up in the first place XX
u need to code server code
What....?
u know what the server and client is?
Ta
** You are now Level 5! **
Ya*
and you know what a server script is?
nvm
basically you need the server to handle that
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
.
what problem
oh
i need to see the server code
to check what its doing
server script
how do I find it?
did you only make a client script
what script did you make then?
does this answer your question? I really don’t know
what
Idk
...
wait
where did you get the ui from
actually what youtube tutorial did you follow
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
sorry
?
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)
In what?
like that
so i can read
if u can
nvm
so theres a few problems
'''
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)
'''
'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)'
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)```
** You are now Level 5! **
Kk
like this
?
.
Kk
Be "right" back ðŸ˜ðŸ˜…
Bro ant coming back
@ why you pull or dis move
@silent jacinth you lied and betrayed me 😠XX XD
Send your code with three of these symbols ` followed by lua at the start of the code, and three at the end
like this
** You are now Level 6! **
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)'
Like dis?
Yep but include the lua too
What das the Lua do?
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)
don't put a space, and keep it lowercased
** You are now Level 2! **
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)
Almost, you just need to put your code on a new line
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)
perfect
Dis?
what is the issue again?
it won’t start the round or do anything when there’s two players in the lobby
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
K
ðŸ˜
So does the 'Round starts in:' UI pop up at all?
No it stays blank no matter what I think
Does anything show in F9?
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
It's hard to help without the whole codebase tbh
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
this code is pretty bad but looks fine. check output window for errors, add prints to show things are or are not running etc
oh and just a word to the wise, don't use this in studio. this is only useful in the roblox player, which you shouldn't need right now. use the Output Window instead: https://create.roblox.com/docs/studio/output
Kk
How do I send it?
F9 has nothing if dat what you mean
What do you mean
@sleek vault
Are either a you der
@digital pond
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)
Must I copy and paste it replacing the original?
Kk
also
But wen I do it ther are a bunch of red lines
leme see
Must I send a screen shot?
ye
where?
in this screenshot?
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)
can you send the corescript(client)
corescript(local)?
yes
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?
breakpoints
makes your game stop
u can right click -> delete them
to delete them
O ok
So do you know what the problem is?
@silent jacinth?
ðŸ˜
wait
i think
but
how is the text supposed to look like?
like 01:20
?
oh
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
yes
?
** You are now Level 7! **
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
ðŸ˜
@silent jacinth wht do you mean and what must I do??
dm me
Kk
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
@silent jacinth