Hello, i wanted to do inventory system with player’s character in it.
But the problem is when i take player’s character and he is moving the resoult wil be this:
i can’t copy player’s character so i had to clone every part/acessory. I tried stoping all animations in already cloned one but i didn’t work. (I can’t stop real players animations because it will ruin the game)
here is script i’m using:
local function UpdateCharacterFrame()
local Character = game.Workspace[Player.Name]
if Character then
local NewModel = Instance.new("Model")
NewModel.Name = "Character"
if CharacterFrame.CharacterVPF:FindFirstChild("Character") then
CharacterFrame.CharacterVPF["Character"]:Destroy()
end
local Camera = Instance.new("Camera")
CharacterFrame.CharacterVPF.CurrentCamera = Camera
Camera.FieldOfView = 50
Camera.Parent = NewModel
Camera.CFrame = CFrame.new(0, 2, 9) * CFrame.Angles(math.rad(-10), 0, 0)
for i, v in pairs(Character:GetChildren()) do
if not v:IsA("BodyColors") then
local NewPart = v:Clone()
NewPart.Parent = NewModel
end
end
NewModel:PivotTo(CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(180), 0))
CharacterFrame.CharacterVPF.CurrentCamera.CameraType = Enum.CameraType.Scriptable
NewModel.Parent = CharacterFrame.CharacterVPF
end
end
if anyone have any idea what can i do to make it so this animation won’t play, pls help me
(I can’t also make template character because some players have diffrent character types like block, R6 or R15)