So, I’m trying to make a tool. When you click the tool, it should be cloning it to the player’s backpack. But, it isn’t doing it. Here’s my error:
And here’s my script:
for i,v in pairs (game.Lighting:GetChildren()) do
if v.Classname == "Strawberry Lolipop" then
c = v:Clone()
c.Parent = click.Backpack
It’s just a typo! It should be “ClassName” instead of “Classname”. Although “Strawberry Lolipop” is not an existing ClassName.
Edit: do you mean “Name”?
do you mean “Name”?
No, I don’t think so. Anyways, thank you very much!
If your problem still persists, do not mark it as solved! Wait for other devs to help you.
If you are not used with these properties or the difference between both, take a look at
ClassName and Name dev hub API.
@mishajones said, I think you meant to write ‘Name’ instead of ‘ClassName’.