the script is

game.Players.LocalPlayer:WaitForChild("Swords", 5)
game.Players.LocalPlayer:WaitForChild("TotalSwordValue", 5)
tot = game.Players.LocalPlayer:WaitForChild('TotalSwordValue')
scrol = script.Parent.ScrollingFrame
player = game.Players.LocalPlayer

game.Players.LocalPlayer.Swords.ChildAdded:connect(function(item)
	print(item.Name.."Added")
	
	if tot.Value == 1 then
		scrol.Item.Text = item.Name
		player.TotalSwordValue.Value = player.TotalSwordValue.Value + 1
	end
end)

i dont see any errors in the output....

if you wanna know what the script does do not look at the totalswordvalue it is supposed to give a textbutton the name of an item added to a folder called 'Swords' the folder is inside the player... if there is more info needed just ask.

8 comments

0

This is in a Local Script or a Regular Script?

0

localscript its for an inventory gui kinda thing

0

if it is a regular script it would give the name of the item to everybody's gui so..

0

Do you insert anything into the swords folder by hand?

0

no

0

i insert it by script if you press a buy button in a shop gui there is a boolvalue added to the folder and that boolvalue's name would be what is supposed to be displayed as item.Name

0

Are you sure that it gets added to it? It should atleast print "Added" if it actualy adds something. (Or error, but you said that it didn't)

0

I see nothing wrong with the ChildAdded event. Could it be that the other variables,perhaps, are incorrectly linked?