So, I'm trying to make a door that only works once you get a key, And I'm trying to make it so whenever you grab the key, it automatically moves the script into the door so you can click to open it. It didn't work though
script.Keyholescript:Clone().Parent=game.Workspace.Keyhole.ClickDetector
Any advice? Thanks
local cloned = script.Keyholescript:Clone() cloned.Parent = game.Workspace.Keyhole.ClickDetector
You could just have a script inside the door all of the time which checks the players backpack for the key though, rather than cloning the script. Your call though. Hope this helped.