So i have tried 2 different ways, neither of them work.
(plr = the player)
1st attempt:
if plr.Backpack["Building Tools"] == true then print("btools") else print("no btools") end
and then my 2nd attempt:
if not plr.Backpack["Building Tools"] == nil then print("btools") else print("no btools") end
Is there a way? All help is appreciated!
Use FindFirstChild function,if it finds the targeted object,it returns true else it returns false
if plr.Backpack:FindFirstChild("Building Tools") then --You dont need to double check it,as it returns the value print("btools") else print("no btools") end
Hello, a way you can check if an instance is inside another, you can do this.
local instance = object:FindFirstChild("whatyouaretryingtofind") if instance then --true --your code here else -- false --your code here end