Roblox Studio Teleport Players To Another Game
Описание
Game Teleport Script:
local teleservice = game:GetService("TeleportService")
function onTouched(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
teleservice:Teleport(6968863121,player)
end
end
script.Parent.Touched:Connect(onTouched)
Tutorial Script:
local teleservice = game:GetService("TeleportService") --A global variable that calls for roblox studios "Teleport Service"
function onTouched(hit) --A function that only fires if it is called like in line 10
if game.Players:GetPlayerFromCharacter(hit.Parent) then --Checks if the parent of what the part hit is a player, if yes continue with the code. If no, then end the function
local player = game.Players:GetPlayerFromCharacter(hit.Parent) --Turns the player into a variable for the rest of the function to freely use
teleservice:Teleport(8518540094,player) --Transfers a players client into a different game
end --Ends the if iine
end --Ends "function onTouched(hit)
script.Parent.Touched:Connect(onTouched) --Looks out for anything that touches the part and fires line 3's function
The music used in the video isn't mine.
#roblox #robloxstudio #tutorial
Рекомендуемые видео


















