Video není dostupné.
Omlouváme se.
How to Make A Round System in Roblox Studio (Countdown & Teleport Players)
Vložit
- čas přidán 9. 03. 2020
- How to Make A Round System in Roblox Studio (Countdown & Teleport Players)
Hey guys! Welcome back to a brand new roblox scripting tutorial in today's video I am going to be teaching you guys how to make a round system in roblox studio. It will countdown and teleport you. It's very cool and actually a lot easier than you may think. I hope you guys enjoy the video and let me know if you have any questions in the comment section below.
-Join my Discord Server to learn and meet other developers!-
/ discord
--Become A Member and Unlock EXCLUSIVE Perks!
/ @thedevking
-- Follow me on twitter! (my name is tapwater because thats my main channel): / realtapwater
-- Follow me on Instagram! (my name is tapwater because of my main channel): / realtapwater
Link to Beginner's Tutorial Series:
• Beginner's Roblox Scri...
--What is this series about and who is it for?
So this series is meant for people who really want to learn exactly how to script, if that is you then I promise by the time you watch this whole series you will know exactly how to script on roblox. Anyways be sure to subscribe to see whenever I release a new tutorial and I will see you guys in the next one. Peace!
Here yall go :
[1'ST SCRIPT IN THE VID]
video:local roundLength = 120
local intermissionLength = 15
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn
InRound.Changed:Connect(function()
wait(1)
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 = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 1, -1 do
InRound.Value = false
wait(1)
Status.Value = "Intermission: ".. i .." seconds left!"
end
for i = roundLength, 1, -1 do
InRound.Value = true
wait(1)
Status.Value = "Game: ".. i .." seconds left!"
end
end
end
spawn (roundTimer)
local Status = game.ReplicatedStorage.Status
local TimerDisplay = script.Parent.TimerDisplay
Status.Changed:Connect(function()
TimerDisplay.Text = Status.Value
end)
Thanks for the script, it was very helpful, but how do you keep the players alive when they die? Say if you were doing an obby, how do you make sure that the player(s) can respawn in the obby?
Thank you so much! You are so helpful.
THANKS SO GODDAMN MUCH IM SUBBING
@@monkosproofs6411 checkpoint scripy
You. Are. A. Legend
Finally, a tutorial that's not 4 years old.
Lol same here
Lol
.
Why are you here?
GearzDev idk
IKR ive been looking for a round based script that was made in 2019 or 2020 FOREVER
a tip for everyone whos using this add "ui corner" to your text label it adds nice curved like corners to your intermission background and i think it makes it look alot nicer
video i made about it:
czcams.com/video/89P-pyYpNNM/video.html
edit: my other channel
or you could just hide the background and its 10 times better??
@@CRT_YT i guess you could do that to
pin this
@@osdysis no
"this will take around 15 minutes." 3 hours later...
if u know the basics of scripting its pretty easy maybe watch some basics before u skip too far ahead
@@godlybatiste4708 yep true
meanwhile me seeing the first line of code and going, "Oh, ok" and then doing everything else myself
@@godlybatiste4708 OHHHHHHH
@@channelnamegoeshere4707 Meanwhile me not flexing to people who are new to the lua language
Finally a tutorial that’s not 4 years old..
2024:
I'd love to see more videos like these, 1 or 2 specific things that aren't massive projects, but something people can put into their games.
Duckin' love it!
sameeeeeeee
langague
@@simplyoliver7165 he said ducking, not fucking
@@KaramBit101 This comment is old wth
@@simplyoliver7165 ik its old
Thanks, this helped me a lot, after struggling endlessly trying to learn how to do it myself:-)
TYSM IT ACTUALLY WORKS, I TRIED THE SMALL TUTORIALS WITH THE "SCRIPT IN THE DESCRIPTION" ( but they dont work ofc) AND TRIED THIS VIDEO, AND IT ACTUALLY WORKS!!!!!!!
@Ethan Hawkinson Do it exact, copy it, look over, do it in all the formations.
@Ethan Hawkinson same
can you make a video on how to have a map voting system for the game? or maybe a video about how to change to different minigame types?
I really like these videos you've been making lately as opposed to your regular scripting series. After a while that series just got really rudimentary and it really didn't give me any further knowledge on any certain topic as I could easily just look it up on the developer forum and understand said topic in less than the time it takes for your video to finish(giving that it is a relatively easy topic of course). These videos on the contrary provide a more in depth and a more interactive experience and do a much better job at driving in previous topics covered on this channel into an actual game idea. I would really enjoy if you could dive into more advanced systems though if that's possible, as that's how I best learn. Perhaps even better, maybe try making videos on systems which involve a more complex mathematical process to get what you are looking for. This doesn't mean that you have to completely abandon your other scripting series though. Overall though, I love the direction in which your channel is heading and I hope it works out for you :-)
Thanks man! I'm glad you like the new videos. I also seriously appreciate the feedback. I will take that into account.
I'm also not a big fan of just scripting topic after scripting topic. I like these videos where the things I've taught people all kinda tie in together. I may be making a few more of those just for some complex features but I believe I'm pretty much done with that series as a whole. I've honestly taught pretty much about 80% of everything there is to know about roblox scripting, maybe more.
If you have any ideas for advanced topics be sure to let me know. I'm always reading these comments :)
i cant see the timer! :C
@@vedbeastz4309 I don't have a timer either.
@@TheDevKing help i dont see the timer
@@TheDevKing why wont it teleport me
"Then it will start counting down, Or actually it won't count down"
-TheDevKing 2020
not funny didnt laugh
@@bigchungus14hvh12 no one asked if you didnt laugh
@@bigchungus14hvh12 nobody cares
@@lukebomber9292 your mum doesnt care
@@bigchungus14hvh12 it wasnt supposed to be a joke-
“It’s really easy trust me”
That’s what a lot of ppl said and now I have a phd in quantum physics
anyone else explain why th it doesnt work? my game's release is in two days and i need a reply that can fix it urgent!!
local roundLength = 120
local intermissionlength = 30
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn
InRound.Changed:Connect(function()
wait(1)
if InRound == 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 = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionlength, 0, -1 do
InRound = false
wait(1)
Status.Value = "Intermission: ".. i .." seconds left!"
end
for i = roundlength, 0, -1 do
InRound = true
wait(1)
Status.Value = "Game: ".. i .." seconds left!"
end
end
end
spawn(roundTimer)
@@SCP173_IS_COMING_FOR_YOU_ZANE I got it under control
@@crimsonngb32 What did u do to make it work
@@mmisterio4206 luckily for me the release of my game was only a demo, and I used a completely different script
I recommend to go watch gnome code’s video
If you can't select an item or object in Roblox Studio, check if it's locked. That's probably why in the beginning of the video you questioned why you couldn't select the object in Roblox Studio. Hopefully this helped! :D
No, he duplicated the baseplate part which you cannot select in your screen, it can only be selected in the main parent, which is the workspace :)
@@gavin9556 You can unlock the baseplate.
@@MrRuby-xz3db okay
@@gavin9556 I know that this is a very late reply but that doesn't make sense because if you check the baseplate properties window, you will notice that the locked property is ticked which causes it to not be able to move it around by just selecting it. But if you didn't duplicate the baseplate, then it will not be able to be dragged.
For anyone having an issue with getting Status, he said to create a intValue for Status but it should be a String instead. I think he fixed it off camera unless I missed it. Thanks for the tutorial, buddy
omg thank you i was about to jump off a bridge
still not working :(
He did mention it in the video by the way
@@beurghy4881 read the output
You missed it 💀
I decided that I want to learn to code in Roblox. And I learned so much today, all because of you. Thanks for the great tutorials
This helped me out a lot! Thanks Dev!
finnally something thats accually helpful in my reccomended
Finally a tutorial video which isn't outdated! 😀
This really helped bro. Thanks
Thank you! This guide was very helpful.
Video idea that could go along with this: Randomize maps, and also make like a random role. For example sheriff and murder and all of that like murder mystery 2. I would enjoy that a lot and it would help me become a much better developer.
Yeah
Yea, i want to make something like you vote for a map, then when the intermission ends, you get teleported to the map that gets more votes. Everybody will have a sword and they'll have to kill everybody in a period of time. The people who survive win. Idk if that already exists.
I would TheDevKing to do that!
need this
I've watched your beginner scripting and advanced scripting tutorial.
me too
Me: tries to script
Also me: fails
aslo also me: searches turorials and copys the script and fail
also also also me: *cries*
ahhahahahahahaha
finally someone who gets me
same, i failed the script i have no idea why
worked for me:
-- Round Variables
local roundLength = 5
local intermissionLength = 10
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = 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 = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 1, -1 do
InRound.Value = false
wait(1)
Status.Value = "Intermission: ".. i .." seconds left!"
end
for i = roundLength, 1, -1 do
InRound.Value = true
wait(1)
Status.Value = "Game: ".. i .." seconds left!"
end
end
end
spawn(roundTimer)
Thanks so much, this was very helpful!
Could you use a module script to contain all the bool/int values? if you're making a bigger game beyond rounds, I just feel like it would be a lot easier
I love how it's not completely perfect because it shows the actually process of coding and debugging. All in all, great video man!😀
yeah i like it when youtubers show they are thinking about what they are writing instead of pasting in a freemodel
Thanks man this was super helpful!
15:31 in the for loop for rounds you can also just move the wait(1) above the inRound.Value and you will be teleported on time!
what?
@@davijak_1 what do you not get about it 💀
that is in pair loop not a for loop if. it was for loop your explanation would be entirely wrong
omg everyone here knows about coding and I'm the only one 💀💀
it hurts my brain
0:21 :DDDDDDDDD i died i think xD
This works fine for me heres the scripts if you need help
--local status = game.ReplicatedStorage.Status
local TimerDisplay = script.Parent.TimerDisplay
status.Changed:Connect(function()
TimerDisplay.Text = status.Value
end)--
--round Variable
local roundLength = -- how long you want the game to be
local intermissionLength = -- how long the intermission is
local inRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = 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 = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 1, -1 do
inRound.Value = false
wait(1)
Status.Value = "Intermission: "..i.." Seconds Remaining!"
end
for i = roundLength, 1, -1 do
inRound.Value = true
wait(1)
Status.Value = "game: "..i.." Seconds Remaining!"
end
end
end
spawn(roundTimer)--
"hope this helps!"
@@poldron7033 Your welcome C:
David wang Your not supposed to copy that part-
Not Working :/
It doesnt work
I love the way he explains things!
It took me awhile to figure it out, but it does indeed work.
for the people wondering what for i = is
for i = 0,0,0 is a loop that keeps going until a specific number is met. heres some examples
for i = start,end, add
these are what they resemble you start with 30 seconds then if end is met for example 0 the loop will stop. and you can divide multiply or remove from add
for i = 30, 0 , -1 do
print("Timer: ".. i) -- i is a variable for index
end
print("Game Starting") -- when timer meets 0 then we will print out game starting
sorry for bad explanation im still learning too
its called a for loop you can watch youtubers can explain it
Nuramirah Ismail i know what it is I just wanted to get it out there because many people start without understanding.
Drawn Out Beats np
In the string "for i" the "i" it's the variable you want to control, for example: for lol = 30, 1, -1 do the "lol" it's the name variable :)
@@hahaha-vf2xl i is a variable which stands for index. but you can change it into anything
It's really cool how often you upload dude!
1:45 because the movement for this part was locked because it was a baseplate before
Hey Dev King, could you show us how to do this but, when the Intermission timer is over, red team goes to the red spawn point and blue team goes to the blue spawn point, and when the round is over, both teams go back to the lobby, and the same things goes over and over.
Did u ever find a video or solution to this
@@sk11lz78 probably
@@sk11lz78 you could do an if statement like if player.Team = (teamname) then (script to teleport player to certain part) and then just have one part for each team named differently and then to have them all teleported back just do the regular teleport script or you could just copy and paste the if statement and use one part for both teams (not ideal if you want a short script but easier cuz u can just copy and paste the if statement
I have a question on how to improve this a little bit. How can I make it so that if all players die in a round the round with automatically end and go to the intermission
i have the same question
if your timer display stopped working after you added the teleport script you most likely forgot to add another end statement for your second "for" loop
local Status = game.ReplicatedStorage.Status
local TimerDisplay = script.Parent.TimerDisplay
Status.Changed:Connect(function()
TimerDisplay.Text = Status.Value
end)
what do i do?
I followed all of the video and guess what?!?!?!?!? IT WORKS!!!!!!!!!!!!!!!!!! THANK YOU SO MUCH!!!!!!!!!!!! :D
i like how at 3:25 he makes intermission time longer than the game time xD
Is there a way I can make randomly picked spawn points for the in game section? (Basically when the timer reaches 0 and you are teleported to the game spawn, can I have multiple and it chooses one at random each time?)
@grace me too
You can add a folder or something with parts and get all the parts with :GetChildren and then in the for i,v in pairs loop add another for i,v in pairs loop with this table and then teleport each player to each part...
did you know how to do it yet? pls tell me
It won't teleport me when the timer is over.
Edit: I figured it out, you need to put InRound.Value = true/false and not just InRound = true/false.
THANKS SO MUCH MAN, U EARNED A SUB!!!
YES I AM SO GLAD YOU MADE THIS
can you make it so the countdown will start only when theres 3 people in it?
doesnt work it says only label /:
figured it out?
this helped a lot but how about a part 2 on how to end the game when only one person is alive
thank you devking this system is really helpfull thank you so much!😀
video:local roundLength = 120
local intermissionLength = 15
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn
InRound.Changed:Connect(function()
wait(1)
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 = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 1, -1 do
InRound.Value = false
wait(1)
Status.Value = "Intermission: ".. i .." seconds left!"
end
for i = roundLength, 1, -1 do
InRound.Value = true
wait(1)
Status.Value = "Game: ".. i .." seconds left!"
end
end
end
spawn (roundTimer)
Wow thx for typing all of this tho now im gonna just paste it and fix some
tysm (:
thanks i was lazy af
Thank you so much
How do you give a tool for a certain minigame and take it away in the intermission? Also how do you make multiple minigames?
In the in round function, if it's true you can make the player get the tool and if it's false, check the players inventory for the tool and delete it.
a question : is this outdated bc it doesn't work (the spawn roundtimer has a red line) ?
Bro still helps people out today love you man
im so confused when i start the game it just keeps my Gui on Label and it doesnt countdown????
I cant help but ik what is happening. In output it says TimerDisplay is not a valid member or ScreenGui
Wait I know what is happening. Whatever your textlabel is called you put
@whirlipie mee toooo
@@LiamOSullivan u put.. what sorry
@@bethyprado7325 no I didn't XD
Thank you, But how to make so it requires 2 players minimum?
And how to make so players teleport in diffrent spots?
i want to know how to tp in different spots too
I know its possible but I'm wondering how I'd go about making it for 2 players to be chosen and then spawned into the arena. Any way you could think possibly?
i watch the full video and the spawn(roundTimer) is like ima gonna be a mistkae
Are you able to do this with a Monster/Enemy instead of changing to the map?
Yea just follow the steps for teleporting players but instead if players put the name of the monster and make sure you clone it or else it could run out
Can you do a tutorial on metatables?
the pli from the into the mouth meme at the beginning doe XD
Yes it worked! Thanks so much i subscribed!
Can you tell me how?
Wait quick question my game has teams so how would I do that really inportant pls get back to me
Lmao He put Status to String Value a bit later in the video. Took me a while to figure it out.
Thanks, this made the script work for me after changing Status to a String Value.
You're supposed to watch the whole video to understand it so no doubt your making mistakes.
@@oogleschnork just work as you watch
I'm making a game like toh but with guns and its infinite length but it ends when someone hits the top how would i do that?
TYSM THIS IS EXACTLY WHAT I NEED
him: very very easy.
also him: ima make this vid 16 mins long
Your impatient
That’s short
can you do a tutorial that does about an intermission that randomly teleport you to different maps in the same game instead of one
Use math.random(start, end).
Also use if statements to see what number you got.
Say if I got 1, I would TP to the house.
Say if I got 2, I would TP to the garage.
Etc.
@@focat What would the start, end be? would it be a block, or coordinates?
I got that there are a lot of ways to make same thing. Like I can use the other script to make absolutely similar system like his one. It's easier but takes more time
"Finally, a tutorial that's not 4 years old."
how do i make it so that when you die you respawn into the game and not the lobby till the round ends
Team
AllowTeamChangeAtTouch
@@alwanla5674 How do I do that?
@@BonnNova on the property of spawnobjectthere is property that called change team on touch
@@BonnNova do you have discord i can send you a video how to do it here my discord id
AlwanLA #4547
How do we add a map selection to this pls I need to know
Dont think u can but i just made mine a random map generator so it picks the map by it self
@@jayyyyyyy5531 how?
@@LUKAHDMUSIC something with math.random I will leave the code if I figure it out
Thank you so much!
Biggest fan of the dev king
my timerdisplay only shows label even if i have done everythhing as shown in the video plz help
omg same if u figured it out pls helppp
Yeah same and I spent like a half an hour on this-
Show me your script and then I can fix it.
The thing didn’t teleport me anywhere, it was just a moving text label ok that works but when it reached 0 of intermission nothing happened I just stayed put :( can anyone help?
Me too
@@poldron7033 hmm?
@@poldron7033 i did
@@poldron7033 i did but it didnt work
May I ask if theres a way where you can make the spawns randomized??
can someone help me in this part 11:22 cuz it saids that TimerDisplay isn't a thing and I did everything
On Explorer tab, make sure in starter GUI, timer, your initial TextLabel file is renamed TimerDisplay.
Thanks yall
The timer is working but isn't teleporting me I have tried me writing the script, the ones in the comments but nothing is working pls someone help
for me the teleport work but the timer not
Hi. I understand your problem. I made a video that is extremely easy to follow! all the scripts are in their own site so no copy paste from screen needed! You can do it in under 5 mins. Hope this helps! czcams.com/video/2lAwi12kzmg/video.html
Thank you!!!
Men im creating a game and this is SOOOOOOOOOOOOOOOOOOO HELPFUL thank you so mush men u have a big brain im subbing dude men every time i do another youtubers video scripts thing it doesnt work but u men plus u explain others just say copy me or get the script link in description
how do i make a timer that ends when theres one player left doe
if #game.Players:GetPlayers() < 2 then
--what happens when theres 1 player left.
end
it dont work when u hit play after finishing the local script it just says "Label"
Yeah
@Kayden Vrdoljak it still doesn't work
@Andrew2all You have to change status from an Int Value to a String value and keep the script local
@@gabster647 it doesnt work so how? i have change the int value to string value
@@XJNG6 Did you change only the status value to an string value?
Hi, Thank you for this... The Intermission and the Timer worked for me but the teleportation dind't, I tried many times to make it teleport but did not work.
Oh thank goodness its you tap!
and can you copy paste your scripts on the desc. cuz I think ive done some stuff incorrent but I cant see them
I made a tutorial about this with a website dedicated to the scripts and you can do it in under 5 minutes hope it helps czcams.com/video/2lAwi12kzmg/video.html
@@Kazwire if this is going to work ur a life saver cuz i got 4 days to make a game that needs this!
@@Kazwire IT WORKED TYSM :D!!!!!!!
@@doglas2653 np glad I could help
when i get the label part how do you get the label to show up cause this video is a joke to me
Ugh people hating on good videos. Maybe try making a screen gui then put text label?
Or is that too hard
@@learninglua7514 yes it is
Is there a way to set a timer to teleport the player to a different game?
Thanks man! It was easy
8:31 SAVING WHERE I LEFT OFF
no
Hey, this has been helped me a lot when I was making my game thank you so much, but I have been experimenting for a while to figure out how to make multiple teleports so that when the round starts, not everyone teleports in the same spot, but all teleport in their own quadrants. Do you have any tips I can use? I would really appreciate it.
Cff Cff
il y a 1 seconde
bro just create a folder and insert the parts and that s the code
local roundLength = 10
local intermissionLength = 10
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn
local player = game.Players.LocalPlayer
InRound.Changed:Connect(function()
wait(1)
if InRound.Value == true then
for _, player in pairs(game.Players:GetChildren()) do
local rn = math.random(1,15)
if rn == 1 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 2 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 3 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 4 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 5 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 6 then
player.Character.HumanoidRootPartCFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 7 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 8 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 9 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 10 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 11 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 12 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 13 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 14 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
elseif rn == 15 then
player.Character.HumanoidRootPart.CFrame = CFrame.new(insert the location of the part)
print(rn)
script.Parent.Visible = false
end
end
else
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 1, -1 do
InRound.Value = false
wait(1)
Status.Value = "Intermission: ".. i .." seconds left!"
end
for i = roundLength, 1, -1 do
InRound.Value = true
wait(1)
Status.Value = "Game: ".. i .." seconds left!"
end
end
end
spawn (roundTimer)
local Status = game.ReplicatedStorage.Status
local TimerDisplay = script.Parent.TimerDisplay
Status.Changed:Connect(function()
TimerDisplay.Text = Status.Value
end)
i hope that this tip helps you
i know this was a month ago, but you can look at the random function tutorial in the basic scripting tutorial and add that to the teleport script.
I’m making a back to the future game and I wanna make it so the delorean hits 88mph then 6 seconds later, how would I script it so that after hitting 88mph 6 seconds later it would teleport the player to another game and the car would disappear
What was the point of all those variables like intermission length when you could of just put 10 in the for loop?
"very very easy"
my life on Unity
Dev king uploads : me ohhh im interested
Me : sees title
Well that was unspected....
was it?
y r u
if you put two of the game spawns, will the script randomly or equally distribute the players to each team?
How do we teleport everyone except one person who is randomly chosen
And how to make it do the same but when people vote for a map it teleports them except the person who was randomly chosen
OMG THIS HELPED ALOT finally after all these years somebody with a good and helpful tutorial
Even thought my Dad helped more
Hello! My script's teleport did not work. Could you possibly send your script so I can see what I did wrong? Thanks!
my gui is stuck on “label.” no issues with TimerDisplay, the code is exactly the same. turned on API and all that, can someone please help?
@wgse ck at the InRound section
try putting inRound instead and look at the end) because it could just be a simple issue like that
make sure that all the lines match up and there are an equal number of ends as his, hope this helps
Make sure all your parts like the lobby and the lobbyspawn are named right-
open out put to check for errors
Did you add the 2 values to ReplicatedStorage??
Thank You This Helps With My Game
Thanks DevKing.I was looking for this, now my game will reach 100k visits!
did it reach 100k visits?
that's what i thought
lol what did it reach tho@@Telexelent
How would I do it so instead of you spawning on a part, how do you spawn In different teams
i havent watched it yet but you should watch his teams video maybe he will cover it there
@@acemo1 I dont think he did. I also have this question.
I also have this question