Hi, I’m trying to make a keycard door system and I’m stuck on trying to figure out how to see a player’s backpack and locate a specific tool without the tool in question being equipped.
Basics
When a player finishes an interaction with a ProximityPrompt, a script should check if the player has a certin clerence (or keycard, tool) in their pack.
The user should not have to equip the tool for the system to see it.
Current Scripts
local TS = game:GetService(“TweenService”)
local player = game.Players
local door = script.Parent.Union
local ProxPrompt = script.Parent.Prox1.ProximityPrompt
local ProxPrompt2 = script.Parent.Prox2.ProximityPrompt
local accesslevel = script.Parent[“Access level”]
local PermAccess = accesslevel.Value
local TweenService = game:GetService(“TweenService”)
local TweenIn = TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tweenclose = TweenService:Create(door, TweenIn,{Position = Vector3.new(134.419, 4.264, -173.46)}) – change to your positions
local tweenopen = TweenService:Create(door, TweenIn, {Position = Vector3.new(134.419, 4.264, -169.494)})
ProxPrompt.Triggered:Connect(function()
if ProxPrompt.ActionText == “Close” then
tweenclose:Play()
ProxPrompt.ActionText = “Open”
ProxPrompt2.ActionText = “Open”
else
tweenopen:Play()
ProxPrompt2.ActionText = “Close”
ProxPrompt.ActionText = “Close”
wait(6)
tweenclose:Play()
ProxPrompt2.ActionText = “Open”
ProxPrompt.ActionText = “Open”
end
end)
ProxPrompt2.Triggered:Connect(function()
if ProxPrompt2.ActionText == “Close” then
tweenclose:Play()
ProxPrompt2.ActionText = “Open”
ProxPrompt.ActionText = “Open”
else
tweenopen:Play()
ProxPrompt2.ActionText = “Close”
ProxPrompt.ActionText = “Close”
wait(6)
tweenclose:Play()
ProxPrompt2.ActionText = “Open”
ProxPrompt.ActionText = “Open”
end
end)
Other
The script isn’t done yet, but we’re trying to:
-
Make the door auto-close
-
Make the ProximityPrompt view and check if the player has the needed keycard, or a higher one, if they do the door opens.
This is my first post, sorry if I made it wrong 