Every time either with a Ticket or not it will fire to the client and do nothing else. Door does not open. I have tried many things and nothing is working. It is supposed to open to those who have the ticket in their backpack, and don't open if they don't have a ticket.
Code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Ticket = ReplicatedStorage.TicketError
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
print(player)
print(player.Backpack)
print(hit.Name)
if player.Backpack.Name == "Ticket" then
script.Parent.CanCollide = false
wait(3)
script.Parent.CanCollide = true
else
Ticket:FireClient(player)
end
end)
Error: Click here for screenshot.

3 comments
print(player.Backpack:GetChildren()) - i think this would print the backpack contents? maybe, idk untested.
otherwise use i = 1 #children, and print them out that way. dunno if you can do it in one line. also use prints inside the if and else.
How do I fix player is the nil value?