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

so im trying to get the assets parent.parent but its giving me an error, cant seem to figure it out?

Asked by 2 years ago

so the hair and accessory works, but not the pants, shirt and shoes. and ive made them the same in the exploreres tab

game:GetService("ReplicatedStorage").DripFactor.OnServerEvent:Connect(function(plr, DripValue, Frame)
        local drip2 = chr:WaitForChild("DripFolder"):WaitForChild("Drip")
        local hairdrip2 = chr:WaitForChild("DripFolder"):WaitForChild("HairDrip")
        local accdrip2 = chr:WaitForChild("DripFolder"):WaitForChild("AccessoryDrip")
        local shirtdrip2 = chr:WaitForChild("DripFolder"):WaitForChild("ShirtDrip")
        local pantsdrip2 = chr:WaitForChild("DripFolder"):WaitForChild("PantsDrip")
        local shoesdrip2 = chr:WaitForChild("DripFolder"):WaitForChild("ShoesDrip")
        if Frame.Name == "HairFrame" then
            hairdrip2.Value = DripValue
        elseif Frame.Name == "AccessoryFrame" then
            accdrip2.Value = DripValue
        elseif Frame.Name == "ShirtFrame" then
            shirtdrip2.Value = DripValue
        elseif Frame.Name == "PantsFrame" then
            pantsdrip2.Value = DripValue
        elseif Frame.Name == "ShoesFrame" then
            shoesdrip2.Value = DripValue
        end

this is the error ServerScriptService.Drip:45: attempt to index number with 'Name'

1 answer

Log in to vote
0
Answered by
Puppynniko 1059 Moderation Voter
2 years ago

the issue is the game thinks that "Frame" is a number and that your trying to get Name from a number so it give an error

Ad

Answer this question