They just fixed it, please disregard my statement. (I meant findFirstChild, find being deprecated.)
Have you tested the script I made some changes so copy and paste again.
Ok. I will right now.
Mode: Testing…
Nope, doesn’t work…
Any error? 30 wordsssssssssssss
XD. No.
wordssssssssssssswefsfdsf
Do you have either level_2 or level_3 keycards in your backpack or equipped?
local Access = {
"Level_2",
"Level_3"
}
local ProximityPrompt = script.Parent
local Door = script.Parent.Parent.Parent.Parent.Parent.Door
ProximityPrompt.Triggered:Connect(function(player)
if ProximityPrompt.ActionText == "Open" then
for i,v in pairs(Access) do
if player.Character:FindFirstChild(v) or player.Backpack:FindFirstChild(v) then
Door.Transparency = 1
Door.CanCollide = false
ProximityPrompt.ActionText = "Close"
print(player.Name)
break
end
end
end
end)
I made a mistake try this
Ok.
gflkmdgmnfdgjnkfdjkngskdmvkld
I hate that you need 30+ characters.
Hey, did it ever work out? 30 words sssssgf343u84rfuvbfjdgdfgdfgf
still broken…
should I send a video?
Maybe none of these things exist and that’s why the code doesn’t enter the if
.
…
What do you mean?
That all of the if
arguments are not present.
?
Yeah but I have the level 4 card…
So it does exist.
wordssss
Your script works fine.
But you probably don’t actually have a pass.
Put your pass inside of StarterPlayer->StarterCharacter
and then test your game.
Adding the pass from the client (or the default studio interface) will only add it to the client, not the server.
You can double check what the server thinks by adding this line right after your Connect
line:
print(player.Name, "triggered. Player children:", player:GetChildren(), "Character chilren:", player.Character:GetChildren())
And expand the tables to see if you see your pass.
You could also use this button to run the server and client in separate windows. Add the pass to the server window and see if the door works:
What do you mean by “Pass”?
I mean “access card”.