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

Why isn't this gamepass script working?

Asked by 8 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
local passId = 396490188

function isAuthenticated(player) 
    return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        print(plr.Name .. " has bought the game pass with id " .. passId)
    end

function ontouch() 
    game:GetService("TeleportService").CustomizedTeleportUI = true
local teleportService = game:GetService("TeleportService")
local otherPlaceId = 215389447
local button = script.Parent
local loadingScreen = script.Parent.Parent
local player = game.Players.LocalPlayer

 button.MouseButton1Down:connect(function()
    game:GetService("TeleportService"):Teleport(otherPlaceId, player)
    loadingScreen.Visible = true
    for i = 1, 0, -.05 do
        loadingScreen.BackgroundTransparency = i
        wait()
    end
    loadingScreen.BackgroundTransparency = 0

Thanks for answering! Sorry for not explaining it more :\ The goal of the script is to see if you have the game pass and if you do teleport you to another part of the universe. I tested the script out ingame and when I touched the part that was suppose to do that It wasn't doing it and I can't spot anything wrong with this script so I came to you guys for help, again thanks! :)

0
What's wrong with it? Can you provide any errors, any information, just posting the code does not help us. M39a9am3R 3210 — 8y
0
@m39a9am3R There :) I edited the question iiCasual 20 — 8y

Answer this question