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

I have error in the scripting that I don't understand, how do I fix it?

Asked by 6 years ago

Not sure why I am getting an error: https://gyazo.com/c1925a7b582ba651bc7f5b8e30da3739

script.Parent.DialogChoiceSelected:connect(function(player, choice)
    if choice == script.Parent.DialogChoice.Burger.Okay then
            game.ReplicatedStorage.Burger:Clone().Parent = player.Backpack
            game.ReplicatedStorage.Burger:Clone().Parent = player.StarterGear
        end
    if choice == script.Parent.DialogChoice.BloxyCola.Okay then
            game.ReplicatedStorage.BloxyCola:Clone().Parent = player.Backpack
            game.ReplicatedStorage.BloxyCola:Clone().Parent = player.StarterGear
        end
if choice == script.Parent.DialogChoice.Pizza.Okay then
            game.ReplicatedStorage.Pizza:Clone().Parent = player.Backpack
            game.ReplicatedStorage.Pizza:Clone().Parent = player.StarterGear
        end

0
put " end) " (including the close bracket) at the end to close the function. UgOsMiLy 1074 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
script.Parent.DialogChoiceSelected:connect(function(player, choice)
    if choice == script.Parent.DialogChoice.Burger.Okay then
            game.ReplicatedStorage.Burger:Clone().Parent = player.Backpack
            game.ReplicatedStorage.Burger:Clone().Parent = player.StarterGear
        end
    if choice == script.Parent.DialogChoice.BloxyCola.Okay then
            game.ReplicatedStorage.BloxyCola:Clone().Parent = player.Backpack
            game.ReplicatedStorage.BloxyCola:Clone().Parent = player.StarterGear
        end
if choice == script.Parent.DialogChoice.Pizza.Okay then
            game.ReplicatedStorage.Pizza:Clone().Parent = player.Backpack
            game.ReplicatedStorage.Pizza:Clone().Parent = player.StarterGear
    end
end)
Ad

Answer this question