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

Teleport Service not working?

Asked by
Gojinhan 353 Moderation Voter
5 years ago

Hello, I have a door with a click detector that when clicked puts a light around the player and a billboard gui on their head saying "ready" and another billboard gui on the door counting down from the number 15.

Problem is, this script has worked for a week or two now. I added the whole billboard thing last night and it's not working anymore. It makes a reserved server but instead of going to another place in my Universe, it teleports straight back to the same game just in a private server. For the record I checked the ID and it matches up perfectly with the place Im trying to go to. I don't think I changed anything essential but I'm not sure.

Here's the excerpt from the clickdetector script. (also prob worth mentioning, no errors from what I can see.)

local pchar = playa.Character
local table2 = pchar.Humanoid.MaxHealth
local dmcheck = pchar:FindFirstChild("Damage")
local table3 = pchar.Humanoid.Health
local datatable = {table1, table2, table3}
local invtable = {}
local datasent = {table1, table2, table3}

    if debounce2 == false then
        debounce2 = true
        local pz = script.Parent.Parent.PartZone
        local ree = pz.BillboardGui2:Clone()
        ree.Enabled = true
        ree.Parent = pchar.Head
        pz.BillboardGui.Enabled = true
        local servercount = 15
        while servercount >= 1 do
            servercount = servercount - 1
            pz.BillboardGui.Name1.Text = servercount
            wait(1) 
        end

        local tps = game:GetService("TeleportService")
        local ps = tps:ReserveServer(4456640169)
        tps.CustomizedTeleportUI = true
        local ls = game.ReplicatedStorage.GUI.GoToMedusa:Clone()
        ls.Parent = playa.PlayerGui
        local ff = Instance.new("ForceField")
        ff:Clone().Parent = pchar
        wait()
        tps:TeleportToPrivateServer(4456640169, ps, playersqueing, nil, datasent, playa.PlayerGui.GoToMedusa)


        wait(17)
        debounce2 = false
    end
end)

Inase that isnt enough info this is the entire script:

local playersqueing = {}


local plight = Instance.new("PointLight")
plight.Brightness = 8
plight.Shadows = true
plight.Color = Color3.fromRGB(74, 252, 255)
plight.Parent = game.ReplicatedStorage.Other
local click = script.Parent
debounce = false
debounce2 = false
click.MouseClick:connect(function(playa)
    local pchar = playa.Character
    local table2 = pchar.Humanoid.MaxHealth
    local dmcheck = pchar:FindFirstChild("Damage")
    if dmcheck then
        table1 = dmcheck.Value
    else
        table1 = 0
    end

    local table3 = pchar.Humanoid.Health
    local datatable = {table1, table2, table3}
    local invtable = {}
    local datasent = {table1, table2, table3}
    if debounce == false then
        debounce = true
        local lightind = plight:Clone()
        lightind.Parent = pchar.Head
        table.insert(playersqueing, playa)
        datasent[1] = playa.Character.Humanoid.Health
        for i,v in pairs(playersqueing) do

            print(i,v)
        end
        wait(3)
        debounce = false


    end

    if debounce2 == false then
        debounce2 = true
        local pz = script.Parent.Parent.PartZone
        local ree = pz.BillboardGui2:Clone()
        ree.Enabled = true
        ree.Parent = pchar.Head
        pz.BillboardGui.Enabled = true
        local servercount = 15
        while servercount >= 1 do
            servercount = servercount - 1
            pz.BillboardGui.Name1.Text = servercount
            wait(1) 
        end

        local tps = game:GetService("TeleportService")
        local ps = tps:ReserveServer(4456640169)
        tps.CustomizedTeleportUI = true
        local ls = game.ReplicatedStorage.GUI.GoToMedusa:Clone()
        ls.Parent = playa.PlayerGui
        local ff = Instance.new("ForceField")
        ff:Clone().Parent = pchar
        wait()
        tps:TeleportToPrivateServer(4456640169, ps, playersqueing, nil, datasent, playa.PlayerGui.GoToMedusa)


        wait(17)
        debounce2 = false
    end
end)













1 answer

Log in to vote
0
Answered by
Gojinhan 353 Moderation Voter
5 years ago

Lol I published over my own place that was the issue

Ad

Answer this question