So I've been trying in every way possible but I just can't figure out why my script isn't working. I've managed to get rid of any errors so no errors. I basically wanna make a gui that changes the character by changing the local player's character to some other model, I've managed to do that but now I'm just struggling to figure out how to change the camera subject from the humanoid without any body parts to the actual new character assigned.
local ReplicatedStorage = script.Parent.Parent.Parent.Parent.Functions
local createPartEvent = ReplicatedStorage:WaitForChild("bigheadyellow")
local CurrentCamera = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local pln = script.Parent.Parent.Parent.Parent.Parent.Parent.Name
function onClicked()
createPartEvent:FireServer()
wait(1)
CurrentCamera.CameraType = "Scriptable"
CurrentCamera.CameraSubject = plr.Character.Humanoid
end
script.Parent.MouseButton1Down:connect(onClicked)

2 comments
using localscript for this script
the script seems to work if I make the camerasubject something like game.Workspace.target