#Help

1 messages · Page 1 of 1 (latest)

uneven grotto
#

Hey everyone! 👋
I'm currently developing a horror game using the "Updated Realistic Horror Game Kit" by MonkeyDev.

Right now, I'm trying to set up 3 different locked doors, and I want each door to be unlocked by its own specific key (for example: red key for red door, blue key for blue door, etc.).
I'm using the system already included in the kit, but I'm a bit confused about how to correctly link each Tool (key) to its matching door using RequiredKey or other values.
I’ve duplicated the door models and key Tools, but only one seems to work properly so far. 😅

Could anyone help me figure out how to set this up correctly? Maybe by checking my setup or scripts?

Also — I could really use some help with map design.
I want to create a spooky but realistic environment, but I’m not very experienced with layout, lighting, or environmental assets.
Any tips, suggestions, or feedback would be super helpful. 🙏

Thanks a lot in advance!

hazy path
#

fortnite double pump

uneven grotto
#

Wth

fervent wharfBOT
#

studio** You are now Level 1! **studio

uneven grotto
#

Ima send post code

hazy path
#

make the code so that only one key can open one door 👍

uneven grotto
#

thats the script im using but when i have the key I wont open the door even if i set the value to it

hazy path
#

this just puts a key in the players backpack

#

🫃

#

fortnite dollar

uneven grotto
#

how to i do?

#

The script

hazy path
uneven grotto
#

??

hazy path
#

i gochu

uneven grotto
#

I got a script like this local door = script.Parent
local requiredKey = door:FindFirstChild("RequiredKey") -- StringValue
local debounce = false

local function onTouch(hit)
if debounce then return end
local character = hit.Parent
if not character then return end

local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then return end

local backpack = character:FindFirstChild("Backpack")
local player = game.Players:GetPlayerFromCharacter(character)
if not player then return end

debounce = true

local hasKey = false

-- Search for the key in the player's tools or backpack
local function checkForKey(container)
    for _, item in pairs(container:GetChildren()) do
        if item:IsA("Tool") and item.Name == requiredKey.Value then
            hasKey = true
            break
        end
    end
end

checkForKey(character)
checkForKey(player.Backpack)

if hasKey then
    print("Correct key detected! Opening door...")

    -- Example of opening: disable collision and move it away
    for _,_
hazy path
#

ohhh that explains it, you're missing the flux capacitor.

uneven grotto
#

Wdym?

#

Can you fix the script then?

hazy path
#

buddy doesnt know about the flux capacitor