Hello.
I am currently trying to create a part where you can change the CanCollide properties locally so only the person that scans a key card/ticket can walk through that part.
I am currently using a method with ServerScripts but sadly by doing that it gives everybody without a ticket or a key card access to the staff area/vip rooms.
This is my ServerScript
script.Parent.TicketScanner.Part.Touched:Connect(function(hitturn)
if hitturn.Name == "ValidTicket" then
script.Parent.Blocker.CanCollide = false
wait(5)
script.Parent.Blocker.CanCollide = true
end
end)
It’s a very basic script but it works (not locally)
LocalScripts don’t work since you can’t really change properties with a LocalScript at least when I tried.
Appreciate any help.