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

How to fix this 'Cloning' problem?

Asked by
tanzane 100
10 years ago
Patty = game.Lighting.KrabbyPatty
Tripple = game.Lighting.TripleKrabbyPatty
Double = game.Lighting.DoubleKrabbyPatty
function KrabbyPatty(player, choice)
    if choice.Name == "DoubleKrabbyPatty" then
    Double:Clone()
    Double.Parent = player.Backpack
wait()

elseif choice.Name == "TheKrabbyPatty" then
        Patty:Clone()
        Patty.Parent = player.Backpack
    elseif choice.Name == "TrippleKrabbyPatty" then
        Tripple:Clone()
        Tripple.Parent = player.Backpack    


    end
end

script.Parent.Dialog.DialogChoiceSelected:connect(KrabbyPatty)

Whenever I click the 'same' dialog twice it runs this error. The Parent property of KrabbyPatty is locked, current parent: NULL, new parent Backpack

What does that mean and how do I fix this?

Answer this question