Please help, just stop viewing it only. You are scripters. Don't be anonymous/unknown.
script.Parent.PrimaryPart = script.Parent.Hinge hit = false script.Parent.Parent.Part1.Touched:connect(function() if hit == false then hit = true local i = 0 while i <= 120 do wait() script.Parent:SetPrimaryPartCFrame(CFrame.new(script.Parent.Hinge.Position) * CFrame.Angles(0, math.rad(i), 0)) --Rotates Door i = i + 5 end wait(3) local i = 120 while i >= 0 do wait() script.Parent:SetPrimaryPartCFrame(CFrame.new(script.Parent.Hinge.Position) * CFrame.Angles(0, math.rad(i), 0)) --Rotates Door i = i - 5 end hit = false end end)
The reason several other scriptures are only viewing it, is because you haven't shown any attempts to do it yourself. This isn't constructive, since you're asking us to create a portion of the script for you. I'll give you a few tips:
I'm supposing you want it when someone Presses F, it opens. To do that, remove line 3, and use the KeyDown event. To use that, you'll have to use game.Players.LocalPlayer:GetMouse()
to retrieve the mouse. Note: To use this, it'll need to be a LocalScript within the Player, such as the Player object itself, PlayerGui, or the Backpack.
Once you add in the KeyDown event (Search wiki.roblox.com for it), you'll ned a new debounce. Preferably a value inside of the Hinge itself. A BoolValue that tells if it's open or closed. Also, you'll need another BoolValue to see if another player is already opening/closing it.
That's about as much help as I can give you at this point, so good luck!