Hey everyone, I want to script a keycard thingy so i dont have to waste 500 tools and stuff, but the script I want to do does not work
does anyone have the magic knowledge to help me out?
My Current Code:
local Target = "Keycard"
local Status = script.Status
Permisson = >=5 -- This is where the script breaks when i playtest
local ProximityPrompt = Instance.new("ProximityPrompt")
ProximityPrompt.Parent = script.Reader
ProximityPrompt.ActionText = "Scan Keycard"
ProximityPrompt.ObjectText = "Cargo Lift"
ProximityPrompt.Triggered:Connect(function(Player)
if Player:FindFirstChild("Backpack") and Player.Backpack:FindFirstChild(Target).Permission == Permisson then
-- Code
if Status == "Topside" then
ProximityPrompt.Enabled = false
script.Reader.Acceptance:Play()
task.wait(3.440)
script.Parent.Movement.Upwards.Disabled = false
task.wait(20)
Status = "Bottomside"
ProximityPrompt.Enabled = true
else
ProximityPrompt.Enabled = false
script.Reader.Acceptance:Play()
task.wait(3.440)
script.Parent.Movement.Downwards.Disabled = false
task.wait(15)
Status = "Topside"
ProximityPrompt.Enabled = true
end
else
script.Reader.Denial:Play()
end
end)
Would be cool if this were to work at all.