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

My dialog shop isn't working?

Asked by 8 years ago

here's the Dialog script

local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) -- Check the player has a stats object local stats = player:FindFirstChild('leaderstats') if not stats then return end

local KOs = stats:FindFirstChild('KOs')

)') if not gold then return end

if choice == script.Parent.DialogChoice.Throwing BOMB(10 KOs) then
    if KOs.Value >= 10 then
        game.ReplicatedStorage.Weapon1:Clone().Parent = player.Backpack
        KOs.Value = KOs.Value - 10
    end
elseif choice == dialog.DialogChoice.Darkheart(100 KOs) then
    if KOs.Value >= 100 then
        game.ReplicatedStorage.Weapon2:Clone().Parent = player.Backpack
        KOs.Value = KOs.Value - 100
    end
elseif choice == dialog.DialogChoice.Heat seeking missile launcher(500 KOs) then
    if KOs.Value >= 500 then
        game.ReplicatedStorage.Weapon3:Clone().Parent = player.Backpack
        KOs.Value = KOs.Value - 500
    end
 elseif choice == dialog.DialogChoice.Red scythe(50 KOs) then
    if KOs.Value >= 50 then
        game.ReplicatedStorage.Weapon3:Clone().Parent = player.Backpack
        KOs.Value = KOs.Value - 50
    end
     elseif choice == dialog.DialogChoice.Knife(100 KOs) then
    if gold.Value >= 100 then
        game.ReplicatedStorage.Weapon3:Clone().Parent = player.Backpack
        gold.Value = KOs.Value - 100
    end
end

end)

0
Is there any output? gskw 1046 — 8y
0
what output robertwoodsy5115 16 — 8y
0
there's nothing in the output about my dialog shop robertwoodsy5115 16 — 8y
0
choice == script.Parent.DialogChoice.Throwing BOMB(10 KOs) <------ that should error, so something is in the output. theCJarmy7 1293 — 8y
View all comments (2 more)
0
Unless one of those conditions is true, and it returns. Pyrondon 2089 — 8y
0
you messed up the lua box DaWarTekWizard 169 — 6y

Answer this question