Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 4 years ago

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!

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 xPolarium 1388 — 4y
0
No I just don't know what script broke iowhjmmjjm 7 — 4y

1 answer

Log in to vote
0
Answered by
Joshument 110
4 years ago
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
)
0
And where do I put this? iowhjmmjjm 7 — 4y
Ad

Answer this question