Hello developers. Today I tried making a customization menu that moves your character to the lobby room, but somehow the local script affects the server too?
local player = game.Players.LocalPlayer
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = game.Workspace.LobbyScene.Camera.CFrame
local character = player.Character
character.HumanoidRootPart.CFrame = game.Workspace.LobbyScene.PlayerLocation.CFrame
character:WaitForChild("ForceField")
character.ForceField:Destroy()
Could this not cause issues with players teleporting themselves around? Quite strange. And for an actual request of help though, how would I go about moving the player only locally? Clones of player.Character only show up as nil, so that is not an option.
EDIT: For clarification, my goal was to make it so your character appears in the customization room for editing your character, but when a local script moves the character, the server replicates it too. Thus you have multiple players in the customization room at once for everyone, which is not what I’m going for. It’s supposed to be just your character.
BasePart While part properties do not technically replicate, there are a few exceptions. If the part is created by a client and that client simulates physics (the part falls, hits other objects, moves by constraints, etc.), the resulting changes will get copied to the server.
In other words, you’ll need to work around this in some way. The easiest way that I can think is just give each player their own room, and make sure they don’t overlap.
There are more complicated solutions as well, like creating local copies of the character, but you said that was a no-go.
It’s not a perfect solution, but neither is ROBLOX’s handling of Character replication.
Also just want to say that making copies of the character model is very possible. I’m not sure what you mean by this. Did you assign their parent correctly?
local character = player.Character
local characterClone = character:Clone()
characterClone.Parent = workspace
characterClone.HumanoidRootPart.CFrame = game.Workspace.LobbyScene.PlayerLocation.CFrame
character.ForceField:Destroy()