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

This backweld script won't work!? Help!! it gives a error on bad cast?? [closed]

Asked by
Kenley67 -12
7 years ago
local cp = {"MaxRuthford","rosewood2234", "Player1"}

game.Players.PlayerAdded:connect(function(plr)
    repeat wait() until plr and plr.Character
    for i = 1, #cp do
        if plr.Name == cp[i] then
            local cloack = game.ReplicatedStorage.Cloack
            local cclone = cloack:Clone()
            cclone.Parent = plr.Character.HumanoidRootPart
            local weld = Instance.new("Weld")
            weld.Part0 = plr.Character.HumanoidRootPart
            weld.Part1 = cclone
            weld.C0 = CFrame.new(0,0,0.6)
            weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(30),0)
            weld.Parent = cclone

        end
    end
end)

Closed as Non-Descriptive by Goulstem

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?