Key that needs to be placed down to open door like the mimic

Does anyone know how to make it where u place a key down onto where it needs to be and when u do it leaves ur inventory and goes where u placed it and it opens a door like the mimic

Are you trying to make it where a player touches a part, or use a click detector?

Like example the mimic chapter 3 they have a skull key in there hand and they need to place it down on a skull and when they place it down on the skull it leaves there inventory and goes on the hand and the door opens up

They need to place it down on a skull not hand I mean

Bruh I mean hand not skull I am very stupid

This could be done with varying degrees of complexity and polish, depending on whether or not you want each player to have their own key (in which case you’d keep the key and door local to that client) or if you wanted people to have the option of sharing keys, or letting multiple users passed with a single key (in which case it could all stay on the server)

Now for implementation, you’re going to need a door, a key, and a way for players to pick up the key.

First step, make the key.
Second step, make that key into a Tool object. Players can equip tools.
Third step, make it so that when the key tool is Equipped, the .Touched event is bound to a listening function.
Fourth step, when the key touches any object including the door, your .Touched event will pass the “otherPart” parameter to your listener function. Check to make sure the otherPart actually belongs to the door you want. Should it detect the door truly, open it, and possibly :Destroy() the tool.

There are lots of ways you could open the door- you could set its CanCollide to false and make it transparent, or, more literally, you could have it open on hinges using physics & constraints.

1 Like

I will give u 400 Robux if u help me more I ain’t that good with roblox studio sorry

Thanks for the offer but I’m not currently available to contract. I’m sure if you give it a shot yourself, helpful people in this forum would continue to guide you.

Otherwise if you’re looking to pay for this to be created, I think the DevForum has a place for that business here: Collaboration - DevForum | Roblox

Never been there before what do I click portfolio or what ever or recruitment

The pinned thread at the top of each category will tell you how to structure your posts properly.
Here’s the pinned thread for the Collaboration category: About the Collaboration category

My post got shut down for some reason is there any videos that will help me with this I been trying for so long

Yes, simply do a Google search for “roblox key door tutorial” or something like that, and you’ll find lots of results!

I found this one right away: ROBLOX Tutorial | Door w/ Key 🔑🚪 - YouTube

Looks like the programming starts after they build the door, around the 5:00 timestamp.

1 Like

Ye but I don’t think that shows about placement keys I always search it up and nothing comes up

Damm just noticed ur the guy that made booga booga no wonder why u Dident want my Robux u got millions

1 Like

So if I understand you correctly, you want to make a system more like this: idol_swap

If so, then you could use almost the same method. The only difference would be that you use the .Touched event of your key to detect for the “idol platform” (the pedestal) instead of a door. Then, you can clone a key model from storage, and CFrame it to the position of the pedestal plus a vertical offset that matched 1/2 of the key’s height plus 1/2 of the pedestal’s height.

For ease of implementation, make that “dummy key” a model so we can use :SetPrimaryPartCFrame() and :GetExtentsSize()

When the .Touched event detects the pedestal, clone your dummy key model from, say, the ReplicatedStorage

local dummyKey = game.ReplicatedStorage.DummyKey:Clone()

then set its CFrame to the pedestal’s plus a vertical offset according to their size

local pedestal = workspace.Pedestal -- your BasePart called Pedestal
local offset = CFrame.new(0,pedestal.Size.Y/2,0)*CFrame.new(0,dummyKey:GetExtentsSize().Y/2,0)
dummyKey:SetPrimaryPartCFrame(pedestal.CFrame*offset)

From there it’s just a question of opening the door in any way you want, but the easiest would just be to set its CanCollide to false, and raise its transparency.

1 Like