i want to make a roblox mall that would teleport you to other places when you walk into the store so if you walk in a store within the mall it teleports you to a place like kestral store like in the winter games lobby
Use the teleport service then. Example:
ts=game:GetService("TeleportService") game.Workspace.Part.Touched:connect(function(hit) if hit.Parent and hit.Parent.Humanoid then ts:Teleport(5837573, game.Players:GetPlayerFromCharacter(hit.Parent))--the number is the id of the place. end end)
To do this you need to use the TeleportService. Here's a script for it. Put this script into the PART that you want to teleport you to the place. Note: You need to change the PlaceId yourself.
PlaceId = 000000 Part = script.Parent Players = Game:GetService("Players") Part.Touched:connect(function(Hit) Player = Players:GetPlayerFromCharacter(Hit.Parent) if Player then Game:GetService("TeleportService"):Teleport(PlaceId, Player.Character) end end)
Well, if you add this script inside the part and change the PlaceId to the PlaceId of the game you want them to go to, it should work.
Example: To Use It Insert A Teleportal to a game/place
ts=game:GetService("TeleportService") game.Workspace.Part.Touched:connect(function(hit) if hit.Parent and hit.Parent.Humanoid then ts:Teleport(5837573, game.Players:GetPlayerFromCharacter(hit.Parent))--the number is the id of the place. end end)