So I've started to work on a very basic pseudo character. I nearly got it to "work" (spawn in a couple bricks welded together that would stay there), however I was told that I had to check AutoCharacterLoads to false. However, now there is no character (neither the default, nor the pseudo character), and my camera is where my pseudo character should've spawned. I would greatly appreciate any help. Thanks.
Here's my code, it is in StarterGui:
local player = game.Players.LocalPlayer
local cam = game.Workspace.CurrentCamera
cam.CameraType = "Scriptable"
if not workspace:FindFirstChild('Players') then
m = Instance.new('Model',workspace)
m.Name = 'Players'
end
function spawn_pseudo_character(player)
if workspace.Players:FindFirstChild(player.Name) then -- character already exists, don't do it again
return
end
print('Building character')
local char = Instance.new("Model", workspace.Players)
char.Name = player.Name
local head = Instance.new("Part")
head.Name = "Head"
head.Anchored, head.Locked, head.CanCollide = false, true, true
head.Transparency = 0
head.FormFactor = "Symmetric"
head.Size = Vector3.new(1,1,1)
head.TopSurface, head.BottomSurface = "Smooth", "Smooth"
head.CFrame = CFrame.new(0, 11.5, 0)
head.Parent = char
local torso = Instance.new("Part")
torso.Name = "Torso"
torso.Anchored, head.Locked, head.CanCollide = false, true, true
torso.Transparency = 0
torso.FormFactor = "Symmetric"
torso.Size = Vector3.new(1,2,1)
torso.TopSurface, head.BottomSurface = "Smooth", "Smooth"
torso.CFrame = CFrame.new(0, 10, 0)
torso.Parent = char
local neck = Instance.new("Weld")
neck.Name = "Neck"
neck.Part0, neck.Part1 = torso, head
neck.C0, neck.C1 = torso.CFrame:inverse(), head.CFrame:inverse()
neck.Parent = torso
print('Built character')
local hum = Instance.new("Humanoid", char)
player.Character:Destroy()
player.Character = char
cam.CameraSubject = head
cam.CoordinateFrame = head.CFrame * CFrame.Angles(-180, 0, 0) * CFrame.new(0, 0, 0)
print('Set up character')
end
player.Chatted:connect(function(msg)
if msg == "make_character" then
spawn_pseudo_character(player)
end
end)

2 comments
Thank you for the improvements, however, no character is being spawned in with this script, and I can freely move my camera around in the game as if I'm in studio.
I've only tested this in studio, I'll test it on server and see what I can do from there.