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

How do you make a quest that if you complete it, you can pick up a keycard?

I've had some troubles with trying to make it so if you complete a quest you can pick up a keycard Idk what the script that is broke, so I'm not advertising, but I'll send you a link of the quest []https://www.roblox.com/library/3704323126/Quest-end[]

If anyone can help me I would be very happy!

2 comments

0

Is there a problem posting the code in your question? How to format the code can be seen here: https://forum.scriptinghelpers.org/topic/82/how-to-format-questions-answers-on-the-main-site

0

No I just don't know what script broke

1 answer

local Keycard = "[Keycard Path]"

Keycard.Touched:Connect(function(hit) --Runs when keycard is touched
	local Player = game.Players:GetPlayerFromCharacter(hit.Parent) --Tries to get the player
	if player then --Runs if it was hit by the player
		if player.Quest.Value == true then --Checks to see if a value named quest is equal to true
			local clone = Keycard:Clone() --Clones Keycard
			Keycard.Parent = player.Backpack --Puts keycard in backpack
		end
	end
)

1 comment

0

And where do I put this?

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