Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

CFrame is changing in the server despite being changed in a local script?

I'm trying to make an avatar editor with a set position, and I need to put the player in that position. Using Vector3 works locally, but messes up the player limbs. CFrame works perfectly with moving the player but changes it in the server too which will put two players into that area at once. I really need help with this and haven't been able to find an issue.

Here is the snippet where the CFrame is changed:

Char.LowerTorso.CFrame = CFrame.new(workspace.AvatarCreation.AvatarCreationTP.Position)
Char.LowerTorso.CFrame = CFrame.new(Char.LowerTorso.Position) * CFrame.Angles(0,math.rad(-15),0)

4 comments

0

Is it filtering enabled?

0

What do you think?

0

changing the cframe on a player will always get replicated to the server due to how roblox works, also why teleporting with exploits works

0

Do you know of any alternatives that won't mess up how the player looks? The rotation is meant to be 0,-15,0, which means I can't rotate the player since that ruins how the player looks. The only thing I know of that currently works is CFrame.

1 answer

Unfortunately, that is how Roblox works. CFrame's / teleportation of the player is replicated to the server.

To achieve what you're looking for, you can take advantage of the fact that transparency changed by the client does not replicate to the server. What I would suggest doing is:

  • Keeping your current code, continue to teleport the player where it needs to be.
  • On the server, make all of the parts of the character's transparency set to 1. This will make all of the parts invisible.
  • Also on the server, set all the part's collision off. This is so other players can be in that same inventory space at the same time without collision issues.
  • Now, on the client, set the transparency of all the parts of your character to 0. This makes your character visible on the client, but to the server (and everyone else) your character will be invisible.

Once you're done, set it back.

This discussion is preserved as it was. New answers, comments, and votes are closed.