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

Get No clone into backpack And get no output pls help?

Asked by 4 years ago
Edited 4 years ago

the script is this


function clicked() game.ServerStorage.WoodKey:Clone() game.ServerStorage.WoodKey = game.Players.Backpack end script.Parent.ClickDetector.MouseClick:Connect(clicked)

and there is no output im trying to clone one into the players backpack

1 answer

Log in to vote
1
Answered by
popeeyy 493 Moderation Voter
4 years ago

You are cloning it and doing nothing with the clone first of all. Also, you are setting WoodKey (object) to Backpack, when you're trying to set its parent instead. Lastly, you're setting it to "Backpack" of the Players service, not the actual player.

Try this:

function clicked(Player)
    game.ServerStorage.WoodKey:Clone().Parent = Player.Backpack
end

script.Parent.ClickDetector.MouseClick:Connect(clicked)
Ad

Answer this question