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

Are'nt scripts supposed to run in order?

Asked by 9 years ago

I have a script I made that detects if a person has any of six game passes. the script is...

print ('mark 1')

local passId = 172986242 -- change this to your game pass ID.

function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        local m = Instance.new("Messsage")
m.Parent = Workspace
m.Text = (plr.Name .. "is a First class customer this flight")
wait(12)
m:Destroy()
else 
    print ('continue')
    end
end)

print ('mark 2')

local passId = 172986990 -- change this to your game pass ID.

function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        local m = Instance.new("Messsage")
m.Parent = Workspace
m.Text = (plr.Name .. "is a Business class customer this flight")
wait(12)
m:Destroy()
else 
    print ('continue')
    end
end)

print ('mark 3')

local passId = 172987173 -- change this to your game pass ID.

function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        local m = Instance.new("Messsage")
m.Parent = Workspace
m.Text = (plr.Name .. "is a Economy class customer this flight")
wait(12)
m:Destroy()
else 
    print ('continue')
    end
end)

print ('mark 4')

local passId = 172987506 -- change this to your game pass ID.

function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        local m = Instance.new("Messsage")
m.Parent = Workspace
m.Text = (plr.Name .. "is a Permanent First class customer")
wait(12)
m:Destroy()
else 
    print ('continue')
    end
end)

print('mark 5')

local passId = 172988022 -- change this to your game pass ID.

function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        local m = Instance.new("Messsage")
m.Parent = Workspace
m.Text = (plr.Name .. "is an Economy class customer")
wait(12)
m:Destroy()
else 
    print ('continue')
    end
end)

print ('mark 6')

local passId = 172987757 -- change this to your game pass ID.

function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        local m = Instance.new("Messsage")
m.Parent = Workspace
m.Text = (plr.Name .. "is a Business class customer this flight")
wait(12)
m:Destroy()
else 
    print ('continue')
    end
end)

print('End execution')


and the output is (I'm in studio's "play solo")

Loaded gloo library. Type _G.gloo.Help() for help. 16:26:05.825 - Unable to load plugin icon. Image may have an invalid or unknown format. Ro-Defender Loaded mark 1 mark 2 mark 3 mark 4 mark 5 mark 6 End execution 16:26:06.759 - Game passes can only be queried by a Script running on a ROBLOX game server continue 16:26:06.759 - Game passes can only be queried by a Script running on a ROBLOX game server continue 16:26:06.760 - Game passes can only be queried by a Script running on a ROBLOX game server continue 16:26:06.761 - Game passes can only be queried by a Script running on a ROBLOX game server continue 16:26:06.762 - Game passes can only be queried by a Script running on a ROBLOX game server continue 16:26:06.762 - Game passes can only be queried by a Script running on a ROBLOX game server continue 16:26:06.768 - WaitForChild called on an Instance that is not in a DataModel. 16:26:06.768 - Script 'Plugin_142266930.Kohl's Admin Commands V2', Line 2407 16:26:06.768 - Stack End

16:26:06.769 - Disconnected event because of exception

I have arrived.

~~~~~~~~~~~~~~~~~

Is it something wrong with the Output or is it supposed to do that?

3 answers

Log in to vote
0
Answered by 9 years ago

Check thoroughly for any spelling mistakes, or if you're unsure about any spellings then look them up. The main cause of disconnected event because of exception is spelling mistakes, capital letters where they shouldn't be, etc. Maybe they can't find the value of the player.

Hope this helps.

0
Keep in mind i'm offline. xXxCONBOY456xXx 15 — 9y
Ad
Log in to vote
0
Answered by
3rdblox 30
9 years ago

Is there any more to that error message? It would make it easier to know what line it doesn't like.

0
It dosent have any probloem, im offline. I'm just wondering if their supposed to go in order xXxCONBOY456xXx 15 — 9y
Log in to vote
0
Answered by
iaz3 190
9 years ago

That error is the result of your kohls admin command plugin(WHY?!)

The others are the result of other plugins and your script trying to query(access) gamepass info from play solo(you can't do that)

Not sure about the i have arrived thing, not even sure if it is part of your output.

Run your ro-defender plugin antivirus thing.

Answer this question