Effective way to make a keycard door?

Okay, so I am making a keycard door, but here’s the thing.

I don’t know whether to use TweenService, CFraming, etc. I need something that would be: fast, efficient, and not very resource consuming.

2 Likes

Honestly, my personal preference is TweenService it’s easy to setup, makes animations smooth with the customization and barely uses any performance or causes FPS / Lag.

What about serverside effects? Won’t it slow things down?

How about you make the door open fully clientsidedly with a remote event

What about other people trying to pass through, if it runs on the clientside?

1 Like

FireAllClients, this way it wouldn’t be based off server fps but the client’s which would be smoother

From my experience and what I heard no it won’t, But if this is an issue that you worry about you could also tween it locally, use a remote event or some type of listener (BindableEvent?) for the tween and send it to all clients and have each client handle it themselves.

if you’re making a sliding door it’s easiest to use tweenservice, it doesn’t affect preformance and it’s really smooth. However if you’re making a door that uses pivot you should use CFrame. Another huge tip is to use module scripts so that you don’t have to waste time on updating every single door.

1 Like

Any example of using module scripts?

What’s the difference between a remote and bindable event?

A good explanation I have found previously on the forums was

"
Client script → Another client script: use a Bindable.
Server script → Another server script: use a Bindable.
Client script → Server script: use a Remote.
Server script → Client script: use a Remote."

To answer your question of having a module script I highly highly suggest looking up a video on youtube what are module scripts, It will take you a while to learn! I’m still at beginner level of learning Module scripts but they do indeed save so much time, Imagine a Module Script named “Weapon” then everytime you want to create a new “Gun” you can just reference the Module Script, to start it up example “Damage, Spread, Recoil, Ammo, ReloadTime” I hope that kinda makes sense it’s not the best for me to explain but a video can suffice what you are looking for.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.