Hello. I was making a script, that will give out a tool, and it need to check if the tool is nil. But, as it goes to the checking - it gives out that it is nil. I think, yeah, I know its nil, but, he supposed to give the tool after checking if the tool is nil. Thanks to anyone that will help. Here's the script -
script.Parent.MouseClick:Connect(function(player)
print("Player is taking tool")
if player.Backpack.Chips == nil then
--i need something so he can understand if the chips is not in inventory
local Chips = game.ReplicatedStorage.Foods.Chips
local Chipsclone = Chips:Clone()
Chipsclone.Parent = player.Backpack
end
end)

1 comment
Thank you! Works very well!