Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why doesnt my character turn invisible and why does my character clone twice?

Asked by 4 years ago

local rp = game:GetService("ReplicatedStorage") local Control = rp:WaitForChild("WhiteRemotes"):WaitForChild("Control") local Debris = game:GetService("Debris")

local TweenService = game:GetService("TweenService")

Control.OnServerEvent:Connect(function(Player)

local Char = Player.Character or Player.CharacterAdded:Wait()
local HRP = Char:WaitForChild("HumanoidRootPart")

local Folder = Instance.new("Folder",workspace)
Folder.Name = Player.Name.." Clone"

local stand = workspace:FindFirstChild(Player.Name.." Stand"):FindFirstChild("WhiteSnake")
if stand then

    Char.Archivable = true
    wait(.1)
    local clonelol = Char:Clone()
    wait(.1)
    Char.Archivable = false
    clonelol.Parent = Folder
    print("Player Is Cloned!")

    for _, Part in pairs(Char:GetDescendants())do
        if Part:IsA("BasePart") or Part:IsA("MeshPart") then
            Part.Transparency = 1
            Char.Head.face.Transparency = 1
            Char.HumanoidRootPart.Transparency = 1 

            print("Player is Invis!")

            local AnimControl = stand:WaitForChild("AnimControl")
            for i, track in pairs(AnimControl:GetPlayingAnimationTracks()) do
                track:Stop()
            end

            local idle = AnimControl:LoadAnimation(script:WaitForChild("Idle"))
            idle:Play()

            Control:FireClient(Player)
        end
    end
end

end)

This is my script, its supposed clone the character and turn the main character invis but it clones the player twice and doesnt make the player invisible

0
i got the invisibility part working but it clones the player three times now ShrynxTube 7 — 4y
0
oh wait crap i noticed i forgot to add debounce ShrynxTube 7 — 4y

Answer this question