ive looked online but i havnt found one i like. all of them are slide doors and i want to make one where it opens like a real door. not the animation but ust opens and closes like a real door. basically, like this: https://gyazo.com/7acdf75759f69aa126a4f44c0a206c98 https://gyazo.com/4dd407dac34834083311469c414b5e89 i need this for my game i plan on making. i wanna make it by myself but i have no idea where to start. thanks.
--Touch script local door = game.Workspace.Door --[[ This is to find the door in workspace. just make a wooden part that's brown and put this script in workspace or inside the door if you'd like.--]] door.Touched:connect(function(hit) if hit.Parent and hit.Parent.Humanoid and hit.Parent.Humanoid > 0 and hit.Parent.Character then door.CanCollide = true --door.Transparency = 0.5 wait(2.5) door.CanCollide = false --door.Transparency = 0 end)
By EvIlBrAinBug. I'm using my alt for my scripting helpers acc.
remove all the little dashes for the transparency parts if you want it to go transparent when you touch it.
--click script
local clicker = Instance.new("ClickDetector") local door = game.Workspace.Door clicker.Parent = door door.ClickDetector.MouseClick:connect(function() door.Rotation(#, #, #)-- use the rotate tool and put the numbers here wait(5)--how long it stays open(you can change time if you want doesn't matter to me) door.Rotation(#, #, #)--put the numbers of it's original rotation position numbers end)
Sorry for getting confused for a second but ill just keep the touch script so you can keep it for future reference.