I’ve got a custom character script, but for some reason, the camera doesn’t want to follow my character. I can move it freely, so as the camera (stuck in a place), but it just doesn’t want to follow where I go.
The scripts go like this:
-- CLIENT
local SystemRemote = ReplicatedStorage.Remotes.ArmorData
SystemRemote:FireServer({
Reason = "ChangeChar"
})
Character = Player.CharacterAdded:Wait()
workspace.CurrentCamera.CameraSubject = Character:WaitForChild("Humanoid")
-- SERVER
ArmorData.OnServerEvent:Connect(function(Player,Data)
print(Data.Reason)
local Character
if Data.Reason == "ChangeChar" then
local OldCharacter = Player.Character
local OldHRP = OldCharacter:WaitForChild("HumanoidRootPart")
local NewCharacter = workspace:FindFirstChild("R15")
Player.Character = NewCharacter
Character = Player.Character
Character.HumanoidRootPart.CFrame = OldHRP.CFrame
OldCharacter:Destroy()
print(Character:GetFullName())
end
local Humanoid = Character.Humanoid
local Animator = Humanoid.Animator
local ClothingFolder = Character.Clothing
local Addons = Character.Addons
if Data.Reason == "ArmorActivate" then
Character.Normal.Parent = ClothingFolder
Character.Pants.Parent = ClothingFolder
Character.Muscles.Parent = ClothingFolder
Character.Shirt.Parent = ClothingFolder
ClothingFolder.Armor.Parent = Character
for _, limb in pairs(Character:GetChildren()) do
if limb:IsA('MeshPart') then
limb.Color = Color3.fromRGB(255,255,255)
end
end
Character.Head.Color = Color3.fromRGB(255,255,255)
Character.Hair.Color = Color3.fromRGB(0,255,0)
Character.Hair.Material = Enum.Material.SmoothPlastic
Addons.OLetter.Transparency = 0.3
Addons.GoldenArm.Transparency = 0
Addons.ShieldArm.Transparency = 0
end
end)
What should I do?