Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My Player.Backpack script isn't working. I dont know why but I am pretty sure I did it right though?

local Sword = script.Parent local ReplicatedStorage = game:FindService("ReplicatedStorage") local SwordGive = ReplicatedStorage.ClassicSword

Sword.ProximityPrompt.Triggered:Connect(function(player) local SwordCopy = Sword:Clone() SwordCopy.Parent = player.Backpack end)

this is the script and it seems very easy to do but something is wrong with my backpack script or something and i cant figure it out.

1 answer

Where is the script at?

In the function, you copy "Sword" which is the script's Parent, Not "SwordGive" which is the tool in ReplicatedStorage

local Sword = script.Parent 
local ReplicatedStorage = game:FindService("ReplicatedStorage") 
local SwordGive = ReplicatedStorage.ClassicSword

Sword.ProximityPrompt.Triggered:Connect(function(player) 
	local SwordCopy = SwordGive:Clone() 
	SwordCopy.Parent = player.Backpack 
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.