If I give someone the keycard and he has it in the backpack I want a brick to change the color into red, and if nobody has the keycard change the brick color to green.
Do that like this:
local brick = script.Parent -- Verification brick that changes colors local p = game.Players:GetPlayerFromCharacter(brick) while true do wait() if p then if p.Backpack:FindFirstChild("Keycard") ~= nil then brick.BrickColor = Color3.fromRGB(0,255,0) -- Make it green wait(3) brick.BrickColor = Color3.fromRGB(255,0,0) -- Make it red end end end
Something like that I believe.