Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make it so that when I try to use the wrong key card text appears?

I want to have a door where you have to have a level 2 key card to open it. I also wanted to have text appear if you try to use a level 1 key card saying that it's not a high enough clearance. I've already got the script for the level 2 key card to open the door, I just need the script to make the text to appear for the level 1 key card saying it isn't high enough clearance. Here is the Script I have for the door and some script I have for the level 1 key card, it only plays a sound though.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Name == "KeycardLV2" then
		game.Workspace.KeyAccepted:Play()
		script.Parent.CanCollide = false
		script.Parent.Transparency = 1
		game.Workspace.BigDoorOpen:Play()
		wait (5.5)
		script.Parent.CanCollide = true
		script.Parent.Transparency = 0
		game.Workspace.BigDoorClose:Play()
	end
	if hit.Parent.Name == "KeycardLV1" then 
		game.Workspace.KeyDenied:Play()
		
	end
end)

Any ideas?

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.