How to make a limit player gate in Roblox Studio (OUTDATED)
HTML-код
- Опубликовано: 21 авг 2024
- Hey Guys
Today we'll be learning how to make a limit player gate (idk what to call it tbh)
This tutorial was requested, so shoutout to ihavenoname6520
If this helped, please click the thumbs up and if you're new, I'd be grateful if you smashed the subscribe button.
-----MESSAGE-------------
This video is outdated but still work. If you want the updated version which also includes the leave button, watch the video linked down below
VIDEO: • (UPDATED) How to make ...
LINKS:
(Models are outdated but still work)
Gatekit :create.roblox....
TransitionGUI:create.roblox....
Alright, peace!
Did bro just say gay kid? 2:21 and make sure captions are on for more proof XD
he said gatekit
Uhm 😳
i heard GayKit XD
gay... what
Caught in 4 k
Thanks! That actually worked
If u get an error and u can’t teleport to second place publish it too
But when you teleport to the place the screen will be black
I published them both and i did third party thing but it didnt work
@@nicolewong8893 make sure to do everything he said and also make a new place and use only that place asset id no other one
Here Is The whole thing :D
local TweenService = game:GetService("TweenService")
local TransitionEvent = game.ReplicatedStorage.TransitionEvent
local Player = game.Players.LocalPlayer
local TransitionGui = Player.PlayerGui:WaitForChild("TransitionGui")
local frame = TransitionGui:WaitForChild("Frame")
TransitionEvent.OnClientEvent:Connect(function()
local framevisible {}
framevisible.backgroundTransperency = 0
local info = tweeninfo.new(2)
TweenService:Create(frame, info, framevisible):Play()
end)
you forgot the equal for framevisible
You forgot some commands
thanks
Tysm
@@Extreme_Playz_1 Alg bro :D
Usually when I do one of these tutorials I have to watch it several times but this was Very easy to understand, Keep up the great work
Can You Make Another Story Series Please 😁
Part 1: Lobby, Lobby Gate, Title Label, Gamepass Shop
Part 2: Dialog, Objective/Timer, Transition Screen
Part 3: Npc Animate Script, Npc Movement
Part 4: Teleport Players Function, Teleport Npc
Part 5: Death Gui, Checkpoints
Part 6: Monster, Jumpscare, Cutscene
Part 7: Shake System, Voting System
Part 8: Boss Fight
Part 9: Ending/Victory
P.S. I subscribed
Hmmmm, I’ll see
bit weird to have it in that order ngl lol, rather do the game, then the lobby teleport, then extra like gamepasses/ badges etc
@@dhashytime6607 can you make a video on how to leave a lobby without getting teleported?
Good idea 😂🎉
good idea
Could you add when player is in the gate and wants to leave he presses the LEAVE button ? Btw this video rlly helped me, ty :)
This earned you a new subscriber! I've been trying to make a cool story/horror game and needed this for my game. This genuinely helped me and I'm so glad this exists since every other tutorial didn't work.
For everyone saying not working, heres the updated version of both MAIN and TRANSITION scripts! Based on the script in the video but with improvements and fixes. Remember to put your placeid and turn on http requests, api and thirparty teleport!
MAINSCRIPT:
local TransitionEvent = game.ReplicatedStorage:WaitForChild("TransitionEvent")
local TeleportService = game:GetService("TeleportService")
local TeleportID = 123456789 -- Change to your game ID
local Players = {}
local IsTeleporting = false
local TeleportPoint = script.Parent:WaitForChild("TeleportPoint")
local PlayersAllowed = script.Parent:WaitForChild("PlayersAllowed")
local Gate = script.Parent:WaitForChild("Gate")
local Timer
local Frame = Gate.SurfaceGui:WaitForChild("Frame")
local PlayerNumber = Frame:WaitForChild("PlayerNumber")
local TimeNumber = Frame:WaitForChild("TimeNumber")
local function Refresh()
PlayerNumber.Text = tostring(#Players)
end
local function RemoveFromList(Char)
for i = 1, #Players do
if Players[i] == Char.Name then
table.remove(Players, i)
Refresh()
break
end
end
end
local function Teleport()
if #Players > 0 then
local TeleportPlayers = {}
for i = 1, #Players do
local player = game.Players:FindFirstChild(Players[i])
if player then
table.insert(TeleportPlayers, player)
TransitionEvent:FireClient(player)
else
table.remove(Players, i)
end
end
local success, codeOrError = pcall(function()
return TeleportService:ReserveServer(TeleportID)
end)
if success then
IsTeleporting = true
local code = codeOrError
local success, errorMessage = pcall(function()
TeleportService:TeleportToPrivateServer(TeleportID, code, TeleportPlayers)
end)
if not success then
warn("Teleportation failed:", errorMessage)
end
repeat wait() until #Players
thank you but what do you do if it just doesnt teleport you in whatsoever *into the gate*
@@EGDBABC I think it might be that your models are wrongly placed in the workspace or you got wrong remoteevents in the replicatedstorage. I have GateKit in workspace and I updated the both main code and the transition code and it works perfectly.
thank you so much i was stuck on trying to make one myself and just couldn't figure it out - im making a game called anomalies - remember the name!
Ive been looking for one of these for about a year and ive finally found one! Keep up the great work
Hey I did this and it works but when the timer is finish it say that I dont have a place to teleport to please can you tell me how do I get another zeleportet where I can teleport to🥰
@elanuredini6620 you need to publish ur game and then go onto setting and accept third party teleports or u need to get the I'd of the place
@@DMH-productions I also have a problem when the timer ends it teleports me but it teleports me to the same game not the other one do you know how i fix this?
@@DMH-productions wait it stopped working now
Hey!!! Tysm for makling this video!! It's really helping me and my friend start a game we've been thinking about for a while!! Are you able to make a quick tutorial on how to make an exit button just in case people want to leave queue? :) TYSM ONCE AGAIN!!
Tysm,I am working on a horror game right now and you were the only one where it actually worked. Simple and good explained!
wana work together ?
This is too useful I made a lot of games and this kit helped a lot to make that games I even shoutout you on my community post! All the best man❤
can you add a leave system? like you can press a textbutton that disable the thing for you and teleports you out
yes i need this too!
local plr = game.Players.LocalPlayer
game.ReplicatedStorage.LeaveButton.OnClientEvent:Connect(function()
script.Parent.LeaveButton.Visible = true
end)
script.Parent.LeaveButton.MouseButton1Click:Connect(function()
game.ReplicatedStorage.LeaveButton:FireServer()
script.Parent.LeaveButton.Visible = false
end
you need to add a button though but theres code for it
@@quackd4347
I NEED THIS SO BAD I'VE BEEN STRUGGLING FOR 3 DAYS
So when you wanna add a leave button: add a part inside the gate, and search up a tutorial on how to make button pop on when part is touched. The add a localscript in the text button and, search up a tutorial how to make button teleport you. Then add another localscript and search up tutorial how to make button disappear on click.
@@thepolandlogoreal txh
I followed your instructions step by step, yet I got error code 773 when trying to teleport. Does the game need to be publicly Published?
Update! I figured it out! I needed to Publish the other world as well. :)
how
how do you do it
Its not working@@missunknowngaming6890
Thx
How
Do you publish the other world
PRO TIP!:
to make it so when the teleporter is full, the game starts sooner than usual follow this!:
open up the GateKit's MainScript, scroll down to the bottom of it, you should see this code starting on line 85:
while wait() do
Timer = 20
for i = 1, Timer do
Timer = Timer - 1
TimeNumber.Text = Timer
wait(1)
end
Teleport()
end
now select all of that portion, delete it, and replace it with this code (to edit the code, say you want the game to begin right after the gate is full, the only value you have to edit is the MaximumPlayerTime number value at the top of this script portion [set to 5 by default] which to make the game start right away you would change the 5 to 0):
local timerSet = false
local MaximumPlayerTime = 5
while wait() do
if timerSet == false then
timerSet = true
Timer = 20
end
if #Players < PlayersAllowed.Value then
Timer = Timer - 1
TimeNumber.Text = Timer
wait(1)
elseif #Players == PlayersAllowed.Value and Timer MaximumPlayerTime then
Timer = MaximumPlayerTime + 1
for i = 1, Timer do
Timer = Timer - 1
TimeNumber.Text = Timer
wait(1)
end
end
if Timer == 0 then
Teleport()
timerSet = false
end
end
thanks
TYSM! but can you make an leave system? like click a leave button or touch the gate again to leave
you have to add a button for leaving but this would be the code!
local plr = game.Players.LocalPlayer
game.ReplicatedStorage.LeaveButton.OnClientEvent:Connect(function()
script.Parent.LeaveButton.Visible = true
end)
script.Parent.LeaveButton.MouseButton1Click:Connect(function()
game.ReplicatedStorage.LeaveButton:FireServer()
script.Parent.LeaveButton.Visible = false
end@@MuluganTy
@@finesse4097tyyyy
yup
@@Onedendy
10:53 you could just click the anchor button right beside colors to your right
when the timer runs out it dosent teleport me
THIS HELPED A LOT YOU ARE THE BEST YT ON WORLD
EVERYONE WHO IS GOING THROUGH ERROR 773 EVEN YOU FOLLOWED CORRECTLY DO THIS TWO THING
1. CHECK YOUR SCRIPT
2. GO TO YOUR SECOND PLACE AND DISABLE THIRD PARTY JOIN AND THEN SAVE THEN ENABLE IT AGAIN THEN SAVE
When ever i try to put the number on top it keeps going to the box in the middle
Pls help
Thank u this really helped with my horror game
the timer isn’t counting down for some reason…
Worked when I fell of my chair
hey, i did everything right but the teleporters dont work. can you please help me?
Script:
local TweenService = game:GetService("TweenService")
local TransitionEvent = game.ReplicatedStorage.TransitionEvent
local Player = game.Players.LocalPlayer
local TransitionGui = Player.PlayerGui:WaitForChild("TransitionGui")
local Frame = TransitionGui:WaitForChild("Frame")
TransitionEvent.OnClientEvent:Connect(function()
local FrameVisible = {}
FrameVisible.BackgroundTransparency = 0
local Info = TweenInfo.new(2)
TweenService:Create(Frame,Info, FrameVisible):Play()
end)
How do I make it so the timer doesn't start counting down until 1 player enters the gate?
yes we need to know
@@AdventuresofVikram did u find out
guys i made the full official script in this comment for yall k
Script:
local TweenService = game:GetService("TweenService")
local TransitionEvent = game.ReplicatedStorage.TransitionEvent
local Player = game.Players.LocalPlayer
local TransitionGui = Player.PlayerGui:WaitForChild("TransitionGui")
local Frame = TransitionGui:WaitForChild("Frame")
TransitionEvent.OnClientEvent:Connect(function()
local FrameVisible = {}
FrameVisible.BackgroundTransparent = 0
local Info = TweenInfo.new(2)
TweenService:Create(Frame, Info, FrameVisible):Play()
end)
I have allow 3rd party Teleports and Studio Access API Service, also I have set my game to public.... but I got 403 forbidden error. Any Idea?
Update: I added a leave button but when I click it the gate still counts me as inside the gate and still teleports me. (I NEED HELP)
reset
@@ismu_xd already tried that
@@Chefy1PLEASE TELL ME Y FOUND OUT HOW AND TELL ME THE CODE
Thank you so much❤ really helped on my horror game ill add you to credits❤ :)
Here is the script (speak to me in Spanish because I speak Spanish) and I don't understand English very much
local TweenService = game:GetService("Tween Service")
local TransitionEvent = game.ReplicatedStorage.TransitionEvent
local Player = game. Players.LocalPlayer
local TransitionGui = Player. PlayerGui:WaitForChild("TransitionGui")
local Frame = TransitionGui:WaitForChild("Frame")
TransitionEvent.OnClientEvent:Connect(function()
local FrameVisible = {}
FrameVisible.Background Transparency = 0
local Info = TweenInfo.new(2)
TweenService:Create(Frame, Info, FrameVisible): Play()
end)
I’ve been looking for a working teleport video that worked the last one I tried said error can’t be teleported this one worked I screamed success
GUYS! if you guys are having a problem teleporting try to publish the game you want to teleport
when i went to test it and when i loaded in it said place restricted please help me, i restarted your tutorial like 10 times.
r u dumb
omg!! tysm!! it helped a lot with my new game im making!! U earned a sub!!!
It worked! Your the best
They are literally 45k views and 431 comments and 727 suscribers YOU GUYS SHOULD SUSCRIBE, HE PUT SO MUCH EFFORT
Thanks bro
Dhasty, can u do a video of how to make the left button? and also, when it teleports the Players numbers is still there, also when i leave or smthing
Why is it not working for me?
Maybe its the script part?
TY!!! I subbed btw! I’m making a game called hotel horror😂
This is very good, thank you 😍😍✌✌, but can you make a script to exit the teleport location so that when the player chooses the wrong location the player can exit the teleport location?
Thanks bro, it really worked, i will even put a small tutorial here
It worked, you put the multiplayer option in 10, however the 1 player text can make the players of the game confused, to do it, Go to the model (GateKit) And then Open, GateModel and go to "Gate" Part and then, surfaceGui, go in frame and you should find it
Note: If you are confused with the go, i mean "Go inside" Go inside file/Inside archive
how do i make it teleport to the TestPlace?
oh nvm i figured it out
THANKS SO MUCH! it really helped me out.❤
how do i unrestrict the second place on Mac book pro
thank you man it really worked ♥
Thank you so much! i will put the game in the reply's when I'm done testing and making changes!
can anyone lplease help me it just kills me or puts me in the void
THANK YOU SO MUCH THIS HAS BEEN A BIG HELP! Im also glad it still works in 2024
yup too in 2023 and all then
everytime i try to go in the teleporter, it ends up killing me? idk how to fix it either i did everything correctly too
same :(
Mine didn’t work
The timer went but then nothing happened
Please tell me what to do😢😢
same with me, have you set game to public? and enable 3rd party teleport (also studio api service) ?
hey great work but i need help, i spent all my free time for the day on this but i doesnt teleport me to the part its ment to i just does nothing? this is so painfull and also idea: can you put the script in the desc in the next video that much easier, ive seen it beeen done
Can u make a small video for an Exit when u tuch the gate in there
this is a very good tutorial but can you make a tutorial on how to make a leace button and how to let the camera show the time and people
Yes thats what happened to me too
did u find a way to make a leave button on this
@@sandwichguy2018 not yet
@@MaximeVanBogaert please let me know when
How can I make it teleport not to the same server? I’m just doing something like a horror game, and I’m making a transition between parts of chapter 1, if there are 2 players in part 1, then only these 2 players should be in part 2, otherwise it turns out that literally everyone is teleported to part 2, no one located on separate servers
did you knew that?
do a new map and make sure that it private and take the place id from this and paste it into the script
There has been a problem for me when i go into the gate it doesnt teleport me in the gate or to the other place (the timer or players doesn't work either)
Me too please help
ME FREAKING TOO
Here I modified the code a little so that the timer starts when a player touches the gate, the bad thing is that if the player resets or exits the game before the timer ends then it freezes, but if another player touches it it starts again. counting from 20 only affects that but the rest works:
local TransitionEvent = game.ReplicatedStorage.TransitionEvent
local TeleportService = game:GetService("TeleportService")
local TeleportID = 16470083832
local Players = {}
local IsTeleporting = false
local TeleportPoint = script.Parent.TeleportPoint
local PlayersAllowed = script.Parent.PlayersAllowed
local Gate = script.Parent.Gate
local Timer = nil
local Frame = Gate.SurfaceGui:WaitForChild("Frame")
local PlayerNumber = Frame:WaitForChild("PlayerNumber")
local TimeNumber = Frame:WaitForChild("TimeNumber")
function Refresh()
PlayerNumber.Text = #Players
end
local function RemoveFromList(Char)
for i = 1, #Players do
if Players[i] == Char.Name then
table.remove(Players, i)
Refresh()
break
end
end
end
local function StartTimer()
Timer = 20
while Timer > 0 do
Timer = Timer - 1
TimeNumber.Text = Timer
wait(1)
end
if #Players > 0 then
local TeleportPlayers = {}
for i = 1, #Players do
if game.Players:FindFirstChild(Players[i]) then
table.insert(TeleportPlayers, game.Players:FindFirstChild(Players[i]))
TransitionEvent:FireClient(game.Players:FindFirstChild(Players[i]))
else
table.remove(Players, i)
end
end
local Code = TeleportService:ReserveServer(TeleportID)
IsTeleporting = true
TeleportService:TeleportToPrivateServer(TeleportID, Code, TeleportPlayers)
repeat
wait(1)
until #Players
if someone is too lazy to write the transition script:
local TweenService = game:GetService("TweenService")
local TransitionEvent = game.ReplicatedStorage.TransitionEvent
local Player = game.Players.LocalPlayer
local TransitionGui = Player.PlayerGui:WaitForChild("TransitionEvent")
local Frame = TransitionGui:WaitForChild("Frame")
TransitionEvent.OnClientEvent:Connect(function()
local FrameVisible = {}
FrameVisible.BackgroundTransparency = 0
local Info = TweenInfo.new(2)
TweenService:Create(Frame, Info, FrameVisible):Play()
end)
what if u want to exit? no exit button?
Yes no exit button
@@TanksTheLastTANKIEdid u find out
did u find out
did u find a way to make a leave button on this
bro, thank you so much for this, my friend and i are working on a game and i lost hope when i couldnt find any teleports, but thanks to you, we are back on track. thanks for this vid
Hey I did this and it works but when the timer is finish it say that I dont have a place to teleport to please can you tell me how do I get another zeleportet where I can teleport to🥰
@@elanuredini6620publish both games in file
SIR I HOPE U WILL SEE THIS COMMAND. ACTUALLY, IT WORKED AND THX A LOT. BUT WHAT ABOUT THE LEAVING BUTTON?
This really helped me thank you
Thanks you, you had help me a lot. Your video is the only script that had help me :,)
Hey I did this and it works but when the timer is finish it say that I dont have a place to teleport to please can you tell me how do I get another zeleportet where I can teleport to🥰
Maybe the code of the another place is wrong,I wish you luck @@elanuredini6620
@@elanuredini6620 did u publish the 2nd game?
the tutorial helped me a lot thanks!
Teleportation is failing bro :( they are saying that the place is restricted
Thank you very much for the help i've been trying to make a thing like this for hours you saved my time lol thanks
HERE IS YOUR SCRIPT WITHOUT ANY MISSPELL
local TweenService = game:GetService("TweenService")
local TransitionEvent = game.ReplicatedStorage.TransitionEvent
local Player = game.Players.LocalPlayer
local TransitionGui = Player.PlayerGui:WaitForChild("TransitionGui")
local Frame = TransitionGui:WaitForChild("Frame")
TransitionEvent.OnClientEvent:Connect(function()
local FrameVisible = {}
FrameVisible.backgroundTransperency = 0
local info = TweenInfo.new(2)
TweenService:Create(Frame, Info, FrameVisible):Play()
end)
You dont have that many subs but you should have. Its works so nice!
thank you so much for this tutorial it really helped my game alot...
Hi! 😊 I was wondering if you can make another video of how to animate things? That would be great!
could you make a tutorial on a back buttin so when your in the teleporter when you go in theres a back button to leave
Huge W to you for explaining everything!
how can i leave the teleporter?
Just reset
did u find a way to make a leave button on this
great vid love how you go slow when teaching people how to code a lot of youtubers go really fast and its hard to understand
How to leave when player is in the gate?
Just reset
@@ismu_xd bruh!
did u find a way to make a leave button on this
@@NexitYT did u find a way to make a leave button on this
Everything is perfect but when i teleport to the testplace the screen back and never come back normal why
for some reason when i teleport to the game, it says something like "you cannot teleport to this game because it is restricted" even though both of the games are public and posted to roblox
So i have a game and i made a lobby far away but when it teleports me it teleports me back to the lobby bc the the same game
someone pls help my screen just stays black and i get this notification Failed to reserve server: HTTP 403 (Forbidden) (x2) - Server - MainScript:55
How would I make this so that it would teleport someone to somewhere else in the same game
I LOVE THIS VIDEO THANK YOU SO MUCH
For me there isnt a leave button is it only for me or also for others??
Thanks so much fast easy quick tutorial no 20 minute start just right into it!
please make a 1v1 queueing system like the ones in murderers vs sherrif PLEASEEE
YOU MADE MY DAY THANKYOU SO SO MUCH :
tysm that was really helpful and also really painful but it turn out really good ty:)
Can u help me why its dont teleport me I public my game but still not work can u help me need reply
@@roblhacki can
@@roblhacksame idk
@@roblhack did u add the game id to the script??
@@hms..studio740 i know I did it my self
Hey this is very helpful , but how can when we end the game to bring us back in the lobby?
Add a back to lobby button, heres the localscript you put inside the button
local ID = 000000 -- your id
script.Parent.Activated:Connect(function()
game:GetService("TeleportService"):Teleport(game.Players.LocalPlayer, ID)
end)
when i walk up to the gatekit it dosent do anything
great video tutorial I can now make a weird strict dad inspired game :D
it doesent work and im having a panic attack bc i cant figure out what it is
Why wont u screech out what it is then
im your 500th sub!
how to we leave the queue teleport button?
Reset character. I'll try and figure how to add it
@@dhashytime6607 bro its easy u jus gotta add a gui in replicated storage add a script so it enables when you touch the tp gate and add a click detector and add a script then add a part in the workspace and make it so that once we click it it will tp us to that part from which we can leave
@@provalok6266ClickDetector is not a valid member of a GUI, it for a part.
pls help with that
@@provalok6266
did u figure out
@@dhashytime6607
I have 2 questions. How do you add a leave button? so payers can leave the gate. Second how do I make it so the timer on the gate doesn't start until a player enters? (I mean it doesn't matter but I want to figure out how to fix this.)
me too
What I did I just made a kill brick in it and u just walk into it and it kills somehow the kill brick resets it
did u find a way to make a leave button on this
@@I_LOVE_ADO1 did u find a way to make a leave button on this
What about the leave button?
did u find a way to make a leave button on this
can u make one with the scripts im getting confused pls do
how can i like select specific games into the task manager
I’m having a hard time making the Main script:(
AY this guy deserves more subs like he is even a bacon hair cool guy :)
bro loved ur video thankyou soooo much!!!!!!!!!!!!!! :D
please make a video about how to teleport the players once it reached like 4/4 and teleports all 4 of them
open up the GateKit's MainScript, scroll down to the bottom of it, you should see this code starting on line 85:
while wait() do
Timer = 20
for i = 1, Timer do
Timer = Timer - 1
TimeNumber.Text = Timer
wait(1)
end
Teleport()
end
now select all of that portion, delete it, and replace it with this code (to edit the code, say you want the game to begin right after the gate is full, the only value you have to edit is the MaximumPlayerTime number value at the top of this script portion [set to 5 by default] which to make the game start right away you would change the 5 to 0):
local timerSet = false
local MaximumPlayerTime = 5
while wait() do
if timerSet == false then
timerSet = true
Timer = 20
end
if #Players < PlayersAllowed.Value then
Timer = Timer - 1
TimeNumber.Text = Timer
wait(1)
elseif #Players == PlayersAllowed.Value and Timer MaximumPlayerTime then
Timer = MaximumPlayerTime + 1
for i = 1, Timer do
Timer = Timer - 1
TimeNumber.Text = Timer
wait(1)
end
end
if Timer == 0 then
Teleport()
timerSet = false
end
end
Credits to
@shittypoops
Man you are underrated 🔥