Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.