Personally depending on where the key is, i wouldn't use onTouch ( i.e, on a desk, etc) so if you don't mind imma rescript this. Insert a click detector inside the Key, and we will script the key instead.
local function OnClick(player)
wait(0.01)
local Backdoor = game.Workspace.Backdoor
local Key = game.Workspace.KeyModel
Backdoor.CanCollide = false
Backdoor.Transparency = 1
player.PlayerGui.Help.TextLabel.Text = "Objective: Find a way out."
Key.Parent = game.ServerStorage
script.Parent.ClickDetector:connect(OnClick)
-> This script will make the back door invisible and allow players to walk thru it, allowing you to not have to replace it in an actual game. And when the player clicks the key,instead of deleting the key, it sends it to server storage ( which makes it invisible by definition from the player) and updates the players gui.
|