Camera Tweening Issue with Global Script

Hello everyone,

I’m encountering an issue in my single-player Roblox game with camera tweening. I have a module script containing functions to smoothly move the camera to specific positions. While these functions work correctly when triggered by a client (like the command bar), the camera tweening fails when called by a global script.

The functions themselves operate as expected in both cases, and all other changes made by the module script apply when called by a global script. It appears that the issue lies in tweening game.Workspace.CurrentCamera

As I’m still learning Roblox development, I would appreciate any advice on how to ensure consistent camera tweening regardless of whether the function is called by a client or a global script.

Thank you for your help.

1 Like

I believe, from a global script (server sided script), you need to fire an event to the client, to tell them to tween accordingly. As the camera is client sided, it can only be controlled from the client (unless an event is captured from the server, client sided, to tell it what to tween/move like)

Thank you for your suggestion! Using RemoteEvents to communicate between the server and client worked like a charm. The camera tweening now functions smoothly as intended. Your advice was incredibly helpful, and I really appreciate it.

If you have any more advice or suggestions for improving my game, I’d love to hear them. Thanks again for your help!

1 Like

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