I’m trying to replace the player with a simple model, just a cylinder in this example.
-- Inside a LocalScript
-- Reference the local player
local player = game.Players.LocalPlayer
-- Get the player's character
local character = player.Character or player.CharacterAdded:Wait()
-- Remove the existing character model
character:Destroy()
-- Create a new part to replace the character
local part = game.Workspace:WaitForChild("PlayerModel")
local humanoid = Instance.new("Humanoid")
humanoid.Parent = part
part.HumanoidRootPart = part
player.Character = part
-- Get the camera following the new model
cam = workspace.CurrentCamera
cam.CameraSubject = part.Humanoid
This was my best guess at how to approach this issue, but this code does not work. I’m struggling to figure out what I could be doing wrong, any feedback would be great.
That definitely did something, so progress I think. The playermodel is now gone, but it does replace the playermodel with my new model. Instead, my character is invisible and cannot move.
No problem! In that case, I wonder if there are any alternatives to what I’m trying to do? I want the player to be a cube, that’s all.
Maybe I could attach the player to cube, remove their ability to walk, and hardcode in w, a, s, d, to apply a force to the cube. So it moves instead of the player. Thoughts?