local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character.Humanoid
local GUI = player.PlayerGui.Wardrobe:FindFirstChild("GUI")
local PlayerFrame = GUI:FindFirstChild("PlayerFrame")
local clothingEvent = game.ReplicatedStorage.remoteEvents:FindFirstChild("clothingEvent")
local clonedCharacter
character.Archivable = true
local newCamera = Instance.new("Camera")
newCamera.Parent = PlayerFrame
PlayerFrame.CurrentCamera = newCamera
clonedCharacter = character:Clone()
local humanoidRootPart = clonedCharacter:WaitForChild("HumanoidRootPart")
local debounce = false
function renderPlayer()
clonedCharacter.Parent = PlayerFrame.WorldModel
clonedCharacter.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
clonedCharacter:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0, 0, -1), Vector3.new(0, 0, 0)))
newCamera.CFrame = CFrame.new(Vector3.new(0, 0, 5), Vector3.new(0, 0, 0))
end
renderPlayer()```
This is my first time using viewport frames, and I decided to render the player's current model within it. But I can now see that for whatever reason they continue to duplicate and stack upon one another. Does anyone have any idea why this may be happening?
#Player continues to duplicate within ViewportFrame
1 messages · Page 1 of 1 (latest)
so it duplicates every single time when u respawn character?
No, it just duplicates every few seconds
where does this script located?
Its a localscript located in StarterCharacterScripts
wait so if u just join game and dont respawn character it will clone by itself?
I hope u understood what I said, im not english
Yes that is correct
Its okay lol
very very strange
idk why this happens but we can work around this bug and add 'if' thing
like check if the clone already exists
like it yk
I'll try this out in a bit