I have this basement and I want it where you touch it and the door rotates 90 degrees if I am correct, I have no idea what script I would use for this because I am a beginner scripter but I also have a script that is close I think, Check this out
function onTouch(hit) if hit.Parent.Name == "Door" then game.Workspace.Door.CFrame=CFrame.new(1,10,1) end end script.Parent.Touched:connect(onTouch
Plz halp
Here is a picture of the door
https://gyazo.com/12e6360088e167cfc7156d381b55d7b7
Hey! I see you're having a problem with your door and I will gladly fix it, but if you can do me a favor, please union that door. It would make stuff a lot easier.
function onTouch(hit) if hit.Parent:FindFirstChild("Humanoid") then --Checks if the thing that hit it is a player for i=0,80, 1 do --a loop that repeats it for a specific amount of times. game.Workspace.Door.Rotation = game.Workspace.Door.Rotation + Vector3.new(0, i, 0) --If you were to do Door.CFrame then it would have to be CFrame.new, why? Because you cant add a Vector3 value to a CFrame value. wait(0.1)--waits a tenth of a second. end end end script.Parent.Touched:connect(onTouch)
Although you can use a script for this, the best way to do this would be to use surfaces. A specific surface would be a "Hinge".