Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a code system youtube wont work for my code system ?!?!?!?

Asked by 4 years ago

i'm trying to make a script that if you redeem the code you get a tool if you redeem again the text says "Already Redeemed!" if someone in the comments can send me a code of how to make that please do because i'm trying to make a game called "Days before nights" and trying to make a code to get a flash light

code:

if script.Parent.Parent.CodeBar.Text == "BETATESTER" then script.Parent.MouseButton1Click:Connect(function() script.Parent.Text = "Succesfully Redeemed!" wait(2) script.Parent.Text = "Redeem" then player.Backpack == "Flashlight" end end

0
Try learning actual scripting instead of using youtube; it's better to learn, so you can fix the bugs. Probably use DataStores to save the value representing that they have redeemed the code. ISkyLordDoge 37 — 4y

1 answer

Log in to vote
0
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago

Tools:https://developer.roblox.com/en-us/api-reference/class/Tool

I suggest learning about tools first because some of the scripts in your code doesn't make sense and you are supposed to use 2 equals in a for loop

And when making gear you have to clone it to the backpack so it gives everyone who redeems the code.

Ad

Answer this question