I created a local script that teleports you to a set of coordinates depending on a certain value. However, it does not work, and the output shows nothing about this script. Here it is (apologies for messiness and length)
char = game.Players.LocalPlayer.Character
planet = game.Workspace.StarshipWiz.Planet.Value
db = game.Workspace.StarshipWiz.db
function teleporter()
if db == true then
local s = Instance.new("Sound")
s.SoundId = "http://www.roblox.com/asset?id=137064059"
s.Parent = char.Torso
local c = s:clone()
c.Parent = game.Workspace.StarshipWiz["Captain's Chair"].Controlpad
if planet == "Earth" then
char.Torso.CFrame = Vector3.new(-1441.151, 18.113, -160.96)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else
if planet == "Chrome" then
char.Torso.CFrame = Vector3.new(2579.555, 2739.255, 826.241)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else
if planet == "Gold" then
char.Torso.CFrame = Vector3.new(2223.555, 2739.255, 1848.24)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else
if planet == "Lavaland" then
char.Torso.CFrame = Vector3.new(5186.117, 1826.648, 2649.986)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else
if planet == "Raxava Delta" then
char.Torso.CFrame = Vector3.new(-139.283, 967.748, -1860.5)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else
if planet == "Space Station" then
char.Torso.CFrame = Vector3.new(-1412.15, 3602.906, -336.96)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else
if planet == "The Countryside" then
char.Torso.CFrame = Vector3.new(5283.634, 1828.823, 4460.387)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else
if planet == "Venice" then
char.Torso.CFrame = Vector3.new(-914.9, 913.503, -1651.5)
s:Play()
c:Play()
script.Parent.Parent.Parent.Parent:destroy()
else return end
end
end
end
end
end
end
end
else return end
end
script.Parent.MouseButton1Click:connect(teleporter)
Please help?

2 comments
You should move s:Play() c:Play() and the script.Parent.Parent.Parent.Parent:Destroy() lines outside the if statement (since they're in every possibility except "else return", and so are guaranteed to run unless the "else" executes) so that those lines aren't repeated (making it easier to change/manage later)
Why df did this get so many thumbs down?