game.Players.PlayerAdded:connect(function()
if script.Parent.Folder.StarterSword.Value == 0 then
local starterclone = game.Lighting.StarterSword:Clone()
starterclone.Parent = game.Players.LocalPlayer.Backpack
script.Parent.Folder.StarterSword.Value = 1
script.Parent.Folder.TOTALVALUE.Value = script.Parent.Folder.TOTALVALUE.Value + 1
end
end)
script.Parent.Folder.StarterSword.Changed:connect(function()
if script.Parent.Folder.StarterSword.Value == 1 then
local textcopy = script.Parent.ScrollingFrame.TextButton:Clone()
textcopy.Text = "Starter Sword"
if script.Parent.Folder.TOTALVALUE.Value == 1 then
textcopy.Parent = script.Parent.ScrollingFrame.Item
end
if script.Parent.Folder.TOTALVALUE.Value == 2 then
textcopy.Parent = script.Parent.ScrollingFrame.Item2
end
end
end)
thats my script atm am i doing something wrong ? do i need to put the sword folder inside the localplayer ? and second problem = the sword isnt in the backpack on player added function is it because its a localscript?
- its supposed to be an inventory gui that if u get a sword the sword's value goes up to 1 (= u have it in ur inventory) (goes up to 2 if equipped but not there yet) and the total value is supposed to say where it needs to position itself in wich frame
-no errors in output-

2 comments
If there's no errors in input, it's most likely a logic error.
Also, please tell us what the intended purpose of this script is. We haven't a clue what it's for and what it's doing.