Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Teleport Service Issues?

Asked by 9 years ago

Output reads:

Unable to cast value to object: Line 10

TS = game:GetService("TeleportService")
AS = game:GetService('AssetService')

script.Parent.MouseButton1Click:connect(function()
    local player = script.Parent.Parent.Parent.Parent.Parent
    function gameC(id)
    return AS:CreatePlaceAsync(player.Name.."'s Survival", 158648073)
    end
    local id = gameC(id)
    TS:Teleport(id,player.userId)
end)

Answer this question