Server-scripted Tween replicates to client but not server

Where do I even begin?

I’ve coded an NPC to open doors. It does so using WorldRoot:GetPartsBoundInRadius. It then traverses that array of parts and detects if it’s a part with a BoolValue called Opened. It then sets that value to true.
If you’re wondering why there’s a commented code to destroy the door, I just used that to test the pathfinding itself, which worked fine.

The door itself is coded to play a Tween when it detects a change in the BoolValue.
image

According to the Output, it runs just fine.
image

But when I use Run mode, it just looks like this:

The Tween seemingly doesn’t replicate to the server, even though these are all ran by server scripts, and even the pathfinding notices that the door is still closed.

That’s not the even of it though, because oddly, the Tween actually plays when I press Play or Play Here.
image

But when I press Server mode, it shows the door is still closed. I don’t know what’s causing this, because these are Server scripts running the tween, not the client, so there should be no reason for the Tween to only replicate to the client.
image

It doesn’t even stop there either! I decided to test this on another door that had similar code, but used a ProximityPrompt to be interacted with. Guess what? It replicates to the client, but it doesn’t replicate to the server, even though these are server scripts.
image

Are you running the script on the client? Do you understand about the client-server model yet? And filtering enabled? Things you do on the client do not replicate to the server, unless the changes of the instance are owned, like the humanoid or character.

Never mind I found the problem. I had to Tween the CFrame and not the Orientation.

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