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

MissionScript won't work?

Asked by 9 years ago
base = game.Workspace.SurvivorCount 
missionstxt = script.Parent.missions 
Cash = game.Players.LocalPlayer.leaderstats.EXP
tcb = false
--SurvivorCount Mission (1)
base.S1.Changed:connect(function()
    if base.S1.Value == true and base.S2.Value == true then
            missionstxt.Text = "Mission One Complete!"
    end
end)
base.S2.Changed:connect(function()
    if base.S1.Value == true and base.S2.Value == true then
            missionstxt.Text = "Mission One Complete!"
    end
end)
--EXPcount Mission (2)
if missionstxt.Text == "Mission One Complete!" then 
    missionstxt.Text = "Current Mission: Clear out area."
    tcb = true
end
if tcb == true then
    if Cash.Value >= 1350 then
        missionstxt.Text = "Mission Two Complete!";wait(3);game:GetService("TeleportService"):Teleport(199050234)
    end
end

Why won't this script work? It won't detect if the base's S1 and S2 values are true, and if they are true change the text, then change the text again, detect if the player's leaderstats EXP value is 1350, if it is wait then teleport. I'm not good at explaining this. Any help please?

1 answer

Log in to vote
-1
Answered by
X888X 15
9 years ago

May you post what errors you're getting in the Output?

Try this, if it doesn't work post your output in the comments

base = game.Workspace.SurvivorCount
missionstxt = script.Parent.missions
Cash = game.Players.LocalPlayer.leaderstats.EXP
tcb = false
--SurvivorCount Mission (1)
base.S1.Changed:connect(function()
    if base.S1.Value == true and base.S2.Value == true then
            missionstxt.Text = "Mission One Complete!"
    end
end)
base.S2.Changed:connect(function()
    if base.S1.Value == true and base.S2.Value == true then
            missionstxt.Text = "Mission One Complete!"
    end
end)
--EXPcount Mission (2)
if missionstxt.Text == "Mission One Complete!" then
    missionstxt.Text = "Current Mission: Clear out area."
    tcb = true
end
if tcb == true then
    if Cash.Value >= 1350 then
        missionstxt.Text = "Mission Two Complete!"
        wait(3)
        game:GetService("TeleportService"):Teleport(199050234)
    end
end
Ad

Answer this question