Model:SetPrimaryPartCFrame() doesn't work in client

In client:
nil

In-studio:
nil

My code:

nil

What exactly is happening? The “helicopters” seem to be working on the server, but you didn’t provide a client point of view, other than that image of you floating in the air. Could you explain what problems you’re running into?

1 Like

The “helicopters” don’t go to the right position in the client but they do in Studio

If the script is server sided then there shouldn’t be a problem. The script looks fine but maybe try using Tweenservices. There is a good plugin for it: https://www.roblox.com/library/2705651566/TweenSequence-Editor
You can do a lot of stuff with it.

Can I use TweenService on a model?

SetPrimaryPartCFrame() will infact work on the client, as long as you’re using it on a model, and the model has a primary part set.

You should be aware that if you are calling this on the client, ONLY THE CLIENT will see the change, it will not replicate to the server and thus to everyone else.

The reason it seemingly works in studio is because studio has a unique behavior of acting as a server and the client at the same time, therefore there’s no replication issue apparent.

If you want to ensure it works as expected use a test server under the test tab, with one or more clients to ensure you can see the replication in action.

If you’re trying to use the function to animate a model, it should be done via the server to ensure everything is synced between clients.

You can also use the TweenService as stated above to make more concise and controllable animations. Definitely give it a read: https://developer.roblox.com/en-us/api-reference/class/TweenService

Ok. I figured it out, I have 2 scripts that ran and the values were messed up and I figured it out, but thanks!
Edit: it was a server-sided code.