(SOLVED) Prison Life Style Gate System

also if you want a cooldown for the button just add a wait() function into the tween.completed… like this, make sure to add the wait() for both closing and opening. there is 2 tween completed functions can you give solution?

tween.Completed:Connect(function()

					model.PrimaryPart.Position = pos+Offset
					active=false
wait(5)
					coroutine.yield()
				end)
1 Like

Is there a way you could explain how to do this? I’ve looked at the post of the other person, but it only seems to show the option where the part swing (for example a normal door)?

I can’t help you anymore than this, I don’t think anyone can, I’ve made a map just for you which in UNCOPYLOCKED so u can download it and there the gate work when u press the green block so u can just copy that to you game

https://www.roblox.com/games/8952316053/GateOpeningScript

2 Likes

Ok, that’s completely understandable, thanks alot for your efforts to help a dumb person :laughing: :grinning:

You’re not dumb, programming has a gradual learning curve, you do not become a master at a craft if you dont practice, with enough experience you will start grasping more than you thought you could as long as you don’t give up :smiley: ! good luck give solution thanks ~~ Rocky

1 Like

Just a quick thing. I tried customizing the gate that you presented to fit the fences, but after I removed some parts, the gate won’t open/work. I also tried to only change the transparency of the parts that I tried to remove, but it also wasn’t working.

you can only add parts inside of the model that are className “Part” otherwise it will throw a error

If you added any models inside od the gate model you want to ungroup that aswell

Ok, understood. I will check if I added anything inside that caused an error, thanks!

1 Like

I did not add any models whatsoever.

I updated this game this gate is good… you can add anything into the gate model intvalues anything. just dont touch primarypart. and use the same switch or just change mesh… also i added sound for you aswell :smiley:

https://www.roblox.com/games/8952316053/GateOpeningScript

1 Like

also i put a 5 second delay so you cant open and close too fast

1 Like

Oh wow, thank you so much! This will surely save me lots of time! :smiley: