Anyone know how to fix it so that the cloned character doesn’t get in the way? For example, if the user steps forward slightly, the cloned character gets in the FOV making it hard to shoot (with a separate weapon) while in first person.
local function charClone()
local char = player.Character
if not char then return end
local parts = {}
for _, v in ipairs(char:GetChildren()) do
if v:IsA("Motor6D") or v:IsA("JointInstance") or v:IsA("Weld") then
continue
end
if v.Name == "HumanoidRootPart" then
continue
end
if v:IsA("BasePart") then
local c = v:Clone()
c:ClearAllChildren()
c.Anchored = true
c.CanCollide = false
c.Transparency = 0.2
table.insert(parts, c)
elseif v:IsA("Accessory") then
local c = v:Clone()
c.Handle:ClearAllChildren()
c.Handle.Anchored = true
c.Handle.CanCollide = false
c.Handle.Transparency = 0.2
table.insert(parts, c)
elseif v:IsA("BodyColors") or v:IsA("Shirt") or v:IsA("Pants") then
table.insert(parts, v:Clone())
end
end
local model = Instance.new("Model")
model.Parent = SandyFolder
local hl = Instance.new("Highlight")
hl.Parent = model
hl.FillTransparency = 0.6
hl.OutlineTransparency = 1
hl.DepthMode = Enum.HighlightDepthMode.Occluded
for _, p in ipairs(parts) do
p.Parent = model
end
makeVisualsNonBlocking(model)
task.spawn(function()
task.wait(0.1)
local t = tick()
for i = 0, 60 do
task.wait(0.016)
hl.FillColor = Color3.fromHSV(((t + i * 0.03) % 6) / 6, 1, 1)
for _, obj in ipairs(parts) do
if obj:IsA("BasePart") then
obj.Transparency = i / 60
elseif obj:IsA("Accessory") then
obj.Handle.Transparency = i / 60
end
end
end
model:Destroy()
end)
end
this is for a sandevistan ha