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

Why am I not teleporting?

Asked by 8 years ago

I am trying to make a menu for my game, Star Wars Saberfront. However I get this error:

20:21:48.751 - httpGet http://assetgame.roblox.comGame/PlaceLauncher.ashx?request=RequestGame&placeId=330893648&isPartyLeader=false&gender=&isTeleport=true failed. Trying again. Error: http://assetgame.roblox.comGame/PlaceLauncher.ashx?request=RequestGame&placeId=330893648&isPartyLeader=false&gender=&isTeleport=true: Trust check failed, The operation completed successfully. . Elapsed time: 0 20:21:48.794 - Teleport exception: http://assetgame.roblox.comGame/PlaceLauncher.ashx?request=RequestGame&placeId=330893648&isPartyLeader=false&gender=&isTeleport=true: Trust check failed, The operation completed successfully.

And this is my code:

script.Parent.MouseButton1Click:connect(function()
    game:GetService("TeleportService"):Teleport(330893648,game.Players.LocalPlayer)
end)

What do I do?

0
You used game.Players.LocalPlayer, can you use teleport in a local script? xxracerdudexx 75 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago
TP = game:service("TeleportService")
placeID = 330893648

function onClicked()
TP:Teleport(placeID)
end

script.Parent.MouseButton1Click:connect(onClicked)

Make sure it's in a LocalScript

Ad

Answer this question