I'm making a keycard so when it touches the keycardblock it calls a function (no errors in the output). It would be nice if someone could suggest a efficient way to trigger this function, I did the best I could but nothing happens.
local KeyCardBlock = game.workspace.KeyCardBlock local KeyCard = game.workspace.KeyCard local SoundFolder = game.workspace.SoundFolder KeyCardBlock.thing.Touched:Connect(function() if Tool.Parent == game.StarterPack then local keycardcall = 'key card used' print (keycardcall) ---write function for whatever block is changed by this end if KeyCard.Parent == game.workspace local deny = 'Key card denied.' print (deny) SoundFolder.TemporarySound.Playing = true wait (3) SoundFolder.TemporarySound.Playing = false --Sound must be updated end end)
I'm trying to make the computer check whether the keycard is in the StarterPack. It doesn't work when I walk right up to the key card machine and then the transparent 'thing' which should call the function.
I tried make it so it would check if you have the key card. It obviously didn't work.