Youtuber Pet code system Script

youtuber pet system won’t work
If I enter a correct code then it will say code surrender a couple times and sometimes it says succesfully redeemed code and then disapper and still say code surrender.

image

I tried lessening end time/debounces.

1 Like

I never knew that! I will use dark-theme.

are there any errors in your console?

also, can you post your code using markdown code tags:

— code here in ```lua ```

Yes there are I’ll show. I’ll find it.

unknown-14

can you send me the code around those lines? i can’t see the line numbers on the screenshots

The Twitter codes 15 is shown on the second picture you can see line 15

I mean the first pictureI’m sorry

you’re sure it’s line 15?

you could try:

local rs = game:GetService(“ReplicatedStorage”)
rs.RedeemCode:InvokeServer(Code)

Line 33 is where the error is happening.
Please show us the code that errored, so we can help fix your problem.

It is 33? Im I thought it has to do with index nil
with number.

Index nil with number is the error at line 33.
Line 15 is working correctly.

it’s the script TwitterCodes in serverScript on line 33

It shows that it ends there a gap is filled

ah so. i believe your code is a string, and to get an object in an array, you need to use a number.

you are calling Codes[“Bob”][1]

when you need to use an number.

I dont know that will work since I have to pres the code redeem button a thousand times and at once it will say code redeemed and then it ends in my inventory.

How will that work? Because it still equips when I press reedem it sometimes.

You are not checking if TwitterCodes[Code] exists.

https://devforum.roblox.com/t/youtuber-pet-system-bug/1049513

You can see what I mean in complete here.