( a teleport er to a game where you can only join it by the lobby but not from a homepage or web) I am needing help on making a teleporter for my group game, so its easier to link the stats instead of making separate games. Does anyone know how to do this? Please tell me if you know, FYI I'm not that introduced to scripting so please tell me what to do with the info you give me and where to put it. Thanks!
make a new game and check if teleport data is nil. If it is nil it will kick the player from the game meaning they joined manually. You can do this with:
plr:GetJoinData()
Here is the code you need:
game.Players.PlayerAdded:Connect(function(plr) local JoinData = plr:GetJoinData() local TeleportData = JoinData.TeleportData local SourcePlaceId = JoinData.SourcePlaceId if SourcePlaceId == nil or SourcePlaceId ~= JoinData[1] then plr:Kick('Please join from the lobby instead of the website.') end end)
That should check if the player joined manually instead of from a teleport. Hope this helped!