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?(rewrite)

Asked by 8 years ago

I edited the script but it didn't work so here's the new script( I rewrited the question because I thought that noone will reply still if I edited the old one)

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

1local KOs = stats:FindFirstChild('KOs')

)') if not KOs then return end

01if choice == script.Parent.DialogChoice.Throwing BOMB then
02    if KOs.Value >= 10 then
03        game.ReplicatedStorage.Weapon1:Clone().Parent = player.Backpack
04        KOs.Value = KOs.Value - 10
05    end
06elseif choice == dialog.DialogChoice.Darkheart then
07    if KOs.Value >= 100 then
08        game.ReplicatedStorage.Weapon2:Clone().Parent = player.Backpack
09        KOs.Value = KOs.Value - 100
10    end
11elseif choice == dialog.DialogChoice.Heat seeking missile launcher then
12    if KOs.Value >= 500 then
13        game.ReplicatedStorage.Weapon3:Clone().Parent = player.Backpack
14        KOs.Value = KOs.Value - 500
15    end
View all 26 lines...

end)

I want a fixed script

0
Can you please format your script well ? So It's atleast readable 100%? iDarkGames 483 — 8y
0
ok robertwoodsy5115 16 — 8y
0
("I want a fixed script") First, This is not how scripting helpers works. We tell you what you did wrong, you fix it. Second, you have not provided any details of what you expect the script to do and what it is actually doing. You need to provide more details about what is happening and what you want to happen. AZDev 590 — 8y
0
ok robertwoodsy5115 16 — 8y
View all comments (3 more)
0
I'm actually a noob to scripting robertwoodsy5115 16 — 8y
0
I see quite a few errors that should show up in the output. Try looking there NewVoids 97 — 8y
0
I did theres no error in the output robertwoodsy5115 16 — 8y

Answer this question