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

Teleport not working???

Asked by 8 years ago

So I have been trying to work a universed game and sometimes when Im teleported instead of it going to that game the screen goes blank and I have to manually shut it down. This seems to not happen to anyone else, any suggestions? Its a mac

debounce = false

script.Parent.Touched:connect(function(hit)
    if hit.Name == "Torso" or hit.Name == "Head" or hit.Name == "Right Arm" or hit.Name == "Left Arm" or hit.Name == "Right Leg" or hit.Name == "Left Leg" then
        if game.Players:GetPlayerFromCharacter(hit.Parent) and debounce == false then
            if game.Players:GetPlayerFromCharacter(hit.Parent).Credits.Value >= 50 then
                debounce = true
                game.Players:GetPlayerFromCharacter(hit.Parent).Credits.Value = game.Players:GetPlayerFromCharacter(hit.Parent).Credits.Value -50
                game:GetService("TeleportService"):Teleport(367478539,game.Players:GetPlayerFromCharacter(hit.Parent))
                debounce = false
            end
        end
    end
end)
0
Can you provide code that you are using for your teleportation script? Also could it be that it is just taking awhile longer to load, or does it not load at all and just goes black? MrLonely1221 701 — 8y
0
We need the code in order to see the problem. MariusAurelius 85 — 8y
0
ok 1 sec QuantumToast 261 — 8y
0
Print under every if statement and see if the script is even running through the if statements. That will help you figure out where the problem is. Pyrondon 2089 — 8y
0
I think the problem might be with my computer because it works for others QuantumToast 261 — 8y

Answer this question