Hi! I made a game teleport board that shows info about a game and has a button to teleport to the game. it also includes the game icon that is found via the game id, it works %100 of the time.
One of the goals for the board is to have it so that all you need to do is, take it from the toolbox and put it into the workspace, and just add a game name, description, and the game ID into the board info script.
problem is, the teleport script gets the game id from the same place as the game icon using the same method. but, half the time the teleport script works and teleports the player after they click the button, and half the time it just gives me an “Unable to cast string to int64” error. I have seen posts saying I should use pcall, but I have no clue how to use it and can’t seem to find any info on it for what I currently need.
I have tried relatively hard to figure it out but still, I can’t seem to find an understandable solution to this. and I only have about 1 and a half years of experience in Scripting, so if you could, can you please explain how to use a pcall for this script?
here is the Model.
here is the teleport script
local TeleportService = game:GetService(“TeleportService”)
local GetID = script.Parent.Parent.Parent.BoardInfoStorage.GameID.Value
local TeleportID = “”
TeleportID = GetID
script.Parent.ClickDetector.MouseClick:Connect(function(player)
TeleportService:Teleport(TeleportID, game.Players:WaitForChild(player.Name))
end)