i made a game teleport that works then the player touched it but i wanted to make one that has a BillboardGui that says press e to enter and when you press e you go to the diffrent game.
here is the script that i have is it possible to change it around to that when e is pressed it teleports the player?
local TeleportService = game:GetService("TeleportService")
local gameID = "3562975575" -- Game ID--
function onTouched(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
TeleportService:Teleport(gameID, player)
end
end
script.Parent.Touched:connect(onTouched)
