You can write your topic however you want, but you need to answer these questions:
Note: im not sure what category this should be in, if its incorrect, please notify me.
What do you want to achieve? Keep it simple and clear!
having a place thats isnt joinable from friends list and is only joinable from using teleport service from the main game
What is the issue? Include screenshots / videos if possible!
the middle one is the main game. im not completely sure what to do to actually get the desired results for this
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
ive looked and looked but the only thing ive seen is game to game, rather then main game to place
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that itβs easier for people to help you!
local part = script.Parent
part.Touched:Connect(function(toucher)
if game.Players:GetPlayerFromCharacter(toucher.Parent) then
if game:GetService("BadgeService"):UserHasBadgeAsync(game.Players:GetPlayerFromCharacter(toucher.Parent).UserId,2332683555832142) and game.Players:GetPlayerFromCharacter(toucher.Parent):FindFirstChild("Stage2") then
local player = game.Players:GetPlayerFromCharacter(toucher.Parent)
game:GetService("TeleportService"):TeleportAsync(18590823423,{player})
end
end
end)
heres the code used for the teleporting, though i dont think this is nessacary
Please do not ask people to write entire scripts or design entire systems for you. If you canβt answer the three questions above, you should probably pick a different category.
and like i said up top, i dont completely know what category this should be in. so please correct me
you need to open your place in roblox studio then in roblox studioβs game settings>Permissions then set it at private. That should work, im pretty sure that roblox still havent removed that.
Or you can just send teleportation data with some unique key then checking the key in the place, if player does not have key or key is incorrect then kick him.
My bad then, it was probably removed or it was false memory. Try to send teleportation data with some unique key then checking the key in the place, if player does not have key or key is incorrect then kick him.
local Players = game:GetService("Players")
local function onPlayerAdded(player:Player)
pcall(function()
joinData = player:GetJoinData()
teleportData = joinData.tpdata
key = teleportData.key
end)
for _,v in pairs(joinData) do
if typeof(v) == 'table' then
for _,k in pairs(v) do
key = k
end
end
end
if key then
if key == 'im from da redirect game trust me script plsπ₯Ίπ₯Ί' then
else
player:Kick('no access')
end
else
player:Kick('no access')
end
end
Players.PlayerAdded:Connect(onPlayerAdded)
Script to teleport (server-side):
local teleportOptions = Instance.new("TeleportOptions")
local tpdata = {
key = "im from da redirect game trust me script plsπ₯Ίπ₯Ί";
}
teleportOptions:SetTeleportData(tpdata)
game:GetService('TeleportService'):TeleportAsync(PlaceID,{Player},teleportOptions)