local swordname = player.Data.SwordName.Value local sword = game:GetService("ReplicatedStorage"):WaitForChild("Items").sword:Clone()
I am trying to make a variable sword to be an item that is called the same as the value in player.Data.Sword.Value in a folder called items in replicated storage, however, I must get the name of the sword from a StringValue in the player called SwordName. The problem with the code above is that I cant use player.Data.Sword.Value as its not part of replicated storage.
I tried to find some solutions on how to do this but none of them would work for me. Please let me know if you have any idea on how to do this.