How would I make this ‘if’ statement run properly when char.Passport isn’t a thing?
im getting the error “Passport is not a valid member of…” when the passport tool isnt equipped which is causing the ‘elseif’ to not run
script.Parent.Triggered:Connect(function(player)
local char = player.Character
if char.Passport then
script.Parent.Parent.BrickColor = BrickColor.new("Lime green")
wait(1)
script.Parent.Parent.BrickColor = BrickColor.new("medium Medium stone grey")
elseif not char.Passport then
script.Parent.Parent.BrickColor = BrickColor.new("Really red")
wait(1)
script.Parent.Parent.BrickColor = BrickColor.new("medium Medium stone grey")
end
end)