You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? A sword that keeps its scripts when a player buys that sword.
What is the issue? When a player buys a sword, it goes to their backpack, but the sword scripts don’t, so the sword doesn’t function.
What solutions have you tried so far? Looking at old games and comparing scripts.
local player = game.Players.LocalPlayer
local sword = game.ReplicatedStorage.AzureSword
script.Parent.MouseButton1Click:Connect(function()
sword.Parent = player:WaitForChild("Backpack")
end)
Create a RemoteEvent named “GetSword” into the Replicated Storage then a script in the ServerScriptService with this inside of it
game.ReplicatedStorage.GetSword.OnServerEvent:Connect(function(player, sword, TextButton)
local findsword = game.ReplicatedStorage:FindFirstChild(sword)
if findsword then
local newsword = findsword:Clone()
newsword.Parent = player:WaitForChild("Backpack")
for i,v in pairs(TextButton:GetChildren()) do
v:Clone().Parent = newsword
end
end
end)