Tweening Textures, OffsetStud etc

I’m looking for some insight in tweening texture offsets.

Specifically I have created a gunskin script that moves the texture and makes it look animated, but it is extremely expensive on the server, because it’s running in a loop at very small increments to make it seem as fluid as possible. My friend doesn’t have a very good computer and he said he 70 or so frames (uses fps unlocker) when a skin is even equipped.

Are there more efficient methods to this? I looked into tweening it but (correct me if I’m wrong) I don’t think tweenservice can do OffsetStud values, as it isn’t a supported property type.

(I also know that the hit game “Bad Business” has done it successfully, I almost have it down I’m just stumped on fixing it’s efficiency but maintaining that same quality and smoothness)

1 Like

Do it on the client instead? Anything purely visual should never be done on the server, at all. If you want all players to see the animated texture, use a remote event to tell clients to start animating it for themselves.

2 Likes

I took your advice, it works great, client side only replication of the tweens (also figured out a way to make it work with tweenservice) doesn’t eat up anything on the serverside, and is much easier to run for the client. I appreciate it.

1 Like