Hello! I’m struggling with this, I’m very new to scripting so please bear with me.
This is my code
It’s a local script placed in ServerScriptService, would I need to move it into the door part? I’ve tried changing part.Name into part.Parent but it makes no difference.
Hi, assuming your key has a handle, this script should work:
local door = game.Workspace.Door
door.Touched:Connect(function(part)
if part.Parent.Name == "key" then
door.CanCollide = false
door.Transparency = 0.5
end
end)
However, if you want the door opening to be local (client sided), let me know, I’ll also be able to help with that! Let me know how it goes. If this doesn’t work, then please show me the structure of the “key” tool in your explorer.