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

Teleport pearl script help

Asked by 10 years ago
Tool = script.Parent
Tool.Activated:connect(function()
Player = Tool.Parent.Parent
game:GetService("TeleportService"):Teleport(148922198, Player)
end)

This is what I have done, it doesn´t works, What I want to do is a tool with the shape of a sphere that will teleport me to a universe. Please help me ;(

0
Since the Tool is script.Parent, I think you put one extra Parent on Player, take one off. Azarth 3141 — 10y

1 answer

Log in to vote
0
Answered by
samfun123 235 Moderation Voter
10 years ago

Assuming this is a LocalScript in a tool then this code should work

Tool = script.Parent
Tool.Activated:connect(function()
    Player = game:GetService("Players").LocalPlayer
    game:GetService("TeleportService"):Teleport(148922198, Player)
end)
Ad

Answer this question