Hi, I am trying to make a key card reader for my game, and I've got it to sort of work! If the keycard (tool) was in the same model as the rest of the gate, it would work. `
local TweenService = game:GetService("TweenService")
local door1 = script.Parent:WaitForChild("DelivGateLeft")
local door2 = script.Parent:WaitForChild("DelivGateRight")
local card = script.Parent:WaitForChild("Card")
local tweeningInformation = TweenInfo.new(
7,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out,
0,
false,
0
)
-- Tween information would go here
script.Parent.Detector1.Touched:Connect(function(hit)
if hit.Parent == card then
tween1open:Play()
tween2open:Play()
wait(10)
tween1close:Play()
tween2close:Play()
end
end)
So that is fine, but when I put the card into StarterPack, I cant seem to find anything that works! Do I have to change something at the top maybe?

1 comment
It still doesnt work! The detector1 is what I want the keycard to hit in order for the gate to open.