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

How do i clone two or more script into a charatcer?

Asked by 3 years ago

I tried making a script that gives you energy powers when you get energy, but it doesn't work. here's the code:

game.Players.PlayerAdded:Connect(function(plr)
    local power = plr:WaitForChild("power")
    print(power.Value)
    if power.Value == "energy" then
        plr.CharacterAdded:Connect(function(char)
            for i,v in pairs(script:GetChildren()) do
                local clone = v:Clone()
                clone.Parent = char
            end
        end)
    end
end)  

I dont know why but i cant get the power and it doesn't even give errors.

0
nvm i solved it lol dante_dalmatian 9 — 3y

Answer this question