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

Why is a Item not cloning into a player backpack?

Asked by 3 years ago

I'm trying to make a dialog shop, when you use the dialog it will clone the item into your backpack.

But it never works, and the output didn't say anything. What did I do wrong?

(the items are in ReplicatedStorage and it is a server-sided script.)

local witchbrew = game.ReplicatedStorage.WitchBrew:Clone()
local bloxcola = game.ReplicatedStorage.BloxyCola:Clone()


script.Parent.DialogChoiceSelected:connect(function(player,choice)
    if choice.Name == "Bloxycolaprompt" then
        bloxcola.Parent = player.Backpack

    elseif choice.Name == "Witchesbrewprompt" then
        witchbrew.Parent = player.Backpack
    end
end)

0
Its A typical Uppercase problem. try to rename "connect" to "Connect" in 05 line Omerevkizel 27 — 3y

2 answers

Log in to vote
1
Answered by 3 years ago

Perhaps the name isn't "boxycola.." and not "witch.. " try to print it and see the results

Ad
Log in to vote
0
Answered by 3 years ago

Its A typical Uppercase problem. try to rename "connect" to "Connect" in 05 line

0
i tried, but it didn't work, thanks anyway. SirSuperScorpion 27 — 3y

Answer this question