so i made twiter codes where after you type the code the script will clone the gear and put it in your backpack it does work when i put it in startpack but with the twiter code methode it does give the gear but it doesn't do any thing at all ( its like i only have the handle).

the script for the code is the following :

local textBox = script.Parent

local code = "TestCode"

local codeRedeemed = script.Parent.CodeRedeemed

local success = script.Parent.SuccessAudio
local invalid = script.Parent.ErrorAudio
 
textBox.FocusLost:Connect(function(entered, input)
	
	if not entered then return end
	
	local codeEntered = textBox.Text
	
	
	if codeEntered == code then
		
		if codeRedeemed.Value == false then			
			
			codeRedeemed.Value = true
		
			textBox.Text = "Code successfully redeemed!"
			success:Play()
			
			local reward = game.ReplicatedStorage.ClassicSword:Clone()
			reward.Parent = game.Players.LocalPlayer.Backpack
		else
			
			textBox.Text = "Already redeemed!"
			invalid:Play()	
		end
		
	else
		
		textBox.Text = "Invalid code!"
		invalid:Play()			
	end	
end)

Please help me i tryed to fix it but it always doesn't work and i even remade everything.

6 comments

0

on ur script i dont find any problem can u take video?

0

i don't think you can takes videos and post them here though...

0

Can you give us the sword script?

0

does it only give you the handle?

0

for the sword its from the roblox catalogue and i switched bteween a few gears and they all were working normally

0

and it does give the gear with all of the scripts on it as i checked in the explorer