Hi, so I found this pretty interesting. I rewrote code for a generic grocery store sliding door thing, and I’m very surprised it lags very bad when ever it slides open or closes.
I used CFraming to shift it, but I’ve simplified the code alot but apparently that had no impact, it still lags horribly. It sounds complex to figure out a way to replicate the moving of the doors to each client instead of doing it server-sided, so I’m trying to figure out what’s the most ideal way to create moving doors like this…perhaps using constraints and setting their angle properties? Not really sure here.
I’d recommend using TweenService for moving objects, and knowing how to create one. If you’re attempting to make the sliding door so when the player is nearby, I’d recommend using .Magnitude to check the player’s magnitude and game:GetService("RunService").RenderStepped:Connect(function() to check their magnitude every frame.