My current code is:
function onclick(player)
tools=player.Backpack:GetChildren()
if(player:FindFirstChild("Bags"))==nil then
folder=Instance.new("Folder")
folder.Name="Bags"
folder.Parent=player
else
player.Bags:ClearAllChildren()
end
for i=1,#tools do
if (tools[i]:FindFirstChild("Bag"))~=nil then
tools[i].Parent=player.Bags
end
end
location=script.Parent.Parent.Location.Position
baghold=player.Bags:GetChildren()
for i=1, #baghold do
wait(1)
baghold[i].Parent=Workspace
baghold[i].Handle.CFrame=CFrame.new(location)
if(baghold[i].Handle:FindFirstChild("Tag"))==nil then
tag=script.Tag:Clone()
tag.Parent=baghold[i]:FindFirstChild(baghold[i].MainPart.Value)
tag.Player.Text=player.Name
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onclick)
But I was wondering how I get someone's username and then it edits a text box to the player's name.
Script layout: http://prntscr.com/8ti0tg

1 comment
Well it really depends on WHO's username you're acquiring.