Here is a script for a teleporter that I made:
local Teleport = workspace.TeleportPad
function Touch(hit)
if script.Parent.Locked == false and script.Parent.Parent:FindFirstChild("TeleportPad").Locked == false then script.Parent.Locked = time script.Parent.Parent:FindFirstChild("TeleportPad").Locked = true
local pos = script.Parent.Parent:FindFirstChild("TeleportPad")
hit.Parent:moveTo(workspace.TeleportPoint.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:FindFirstChild("TeleportPad").Locked = false end end
script.Parent.Touched:Connect(Touch)
I want the teleporter to only work when you have a specific item in your inventory, such as a key for example. What do I need to add to the script in order for this to happen?

1 comment
Do I need to make this a seperate script or do I need to add this to the script that I made?