Door Script Opening

Hello guys!
I’ve done a post about my door script not working, so
I re-post it to get help.

Pictures

Hello guys! I re-post my old post about my door.
This time, I’ve got every pictures to help more.

Capture d’écran (7)

I’ve deleted the script. The lighter brown is a mesh, do I need to change it? Also, What should the script be and where?

:smiley: Thanks for the help in advanced! :smiley:

Can we see how the script looks like so we can identify the error easily?

I said in the message. I’ve deleted the script, I got so much problems on it.

At least we can see what’s the problem with it.

Seems like nothing is wrong. Just put a server script inside the model and tween the door main part.

How do I tween the main part? I ain’t SO good in the scripts.

Well to answer where the script should go, it could go anywhere, but it is probably easiest to parent it under the “Door” model. Then connect both click events inside that one script, and then insert the code that does the actual opening and closing.

If you need anything, or have any specific questions, let me know!
Just reply with any information about what you are trying to do, and I will do my best to help you out.
Have a good day as well, and if you celebrate it, Happy Halloween. :smiley:

1 Like

@SetDefaultDev put this as a local script and inside the door model

local Hinge = script.Parent.PrimaryPart
local opened = false

function OpenDoor()
	if opened == false then
		opened = true
		for i = 1, 21 do
			script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(5), 0))
			wait()
		end
	else
		opened = false
		for i = 1, 21 do
			script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(-5), 0))
			wait()
		end
	end
end

script.Parent.Handle1.ClickDetector.MouseClick:Connect(OpenDoor)
script.Parent.Handle2.ClickDetector.MouseClick:Connect(OpenDoor)
1 Like

If your new to scripting, I recommend you to learn about TweenService first.

Is this like an alternative for TweenService? Seems complicated to me.

this is how to make animated door open

It’s doing like last time… I can’t open it… :face_with_raised_eyebrow:

you have to click on the handle

I’ve did it. Wanna try? I can send you the game’s link.

ok could you send the model of the door and i will try to make it work

@SetDefaultDev Door - Roblox

thanks, can u un-sale it? i don’t want random to get it…

You should put it as solved @SetDefaultDev