local MainGui = script.Parent
local Lobby = MainGui.Lobby
local Map1 = MainGui.Map1
local Map2 = MainGui.Map2
local player = game.Players.LocalPlayer
local char = player.Character
Lobby.MouseButton1Up:Connect(function()
char.HumanoidRootPart.CFrame = CFrame.new(-49, 1.5, -9.5)
end)
Map1.MouseButton1Up:Connect(function()
char.HumanoidRootPart.CFrame = CFrame.new(-40, 0.9, 56.5)
end)
Map2.MouseButton1Up:Connect(function()
char.HumanoidRootPart.CFrame = CFrame.new(10, 0.7, -31.5)
end)
local MainGui = script.Parent
local Lobby = MainGui.Lobby
local Map1 = MainGui.Map1
local Map2 = MainGui.Map2
local game1 = MainGui.Game1
local game2 = MainGui.Game2
local player = game.Players.LocalPlayer
local char = player.Character
Lobby.MouseButton1Up:Connect(function()
char.HumanoidRootPart.CFrame = CFrame.new(-49, 1.5, -9.5)
end)
Map1.MouseButton1Up:Connect(function()
char.HumanoidRootPart.CFrame = CFrame.new(-40, 0.9, 56.5)
end)
Map2.MouseButton1Up:Connect(function()
char.HumanoidRootPart.CFrame = CFrame.new(10, 0.7, -31.5)
end)
local teleportService = game:GetService("TeleportService")
local player = game.Players.LocalPlayer
local gameID1 = 9636473622 --asset ID for game 1
local gameID2 = 9584650772 --asset ID for game 1
game1.MouseButton1Up:Connect(function()
teleportService:Teleport(gameID1,player) -- code for button Game 1
end)
game2.MouseButton1Up:Connect(function()
teleportService:Teleport(gameID2,player) -- code for button Game 1
end)
Simple Way
local part = script.Parent
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
hit.Parent.HumanoidRootPart.CFrame = CFrame.new(x,y,z)
end
end)