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

The title is to long i'll put it in the descriptinon?

if script.Parent.Text == ("BETAISRELEASED") then game.StarterGui.Menu.MainMenu.CreditsFrame.RedeemCode.MouseButton1Click:Connect(function() game.StarterGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = ("Succesfully Redeemed!") wait(2) game.StarterGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = ("Redeem") end

i'm trying to make a code system it isnt working and i dont know why

title:

Players.JAX_AtRB.PlayerGui.Menu.MainMenu.CreditsFrame.CodeBar.LocalScript:7: Expected ')' (to close '(' at line 3), got

3 answers

✓ Accepted answer

You inversed the places for the ends of each code block.

Correct version:

local player = game.Players.LocalPlayer
local PlayerGui = player:WaitForChild("PlayerGui")

if script.Parent.Text == ("BETAISRELEASED") then 
	PlayerGui.Menu.MainMenu.CreditsFrame.RedeemCode.MouseButton1Click:Connect(function() 
PlayerGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = '("Succesfully Redeemed!") '
wait(2) 
PlayerGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = '("Redeem")'
end)
end

you actually need to do player.PlayerGui b/c all the GUIs in StarterGui are cloned into the Player.PlayerGui for every player that joins.. all visible GUIs in Player.PlayerGui will display on the player's screen

The problem is you didn't close off the function call: jhere is your code rewritten:

local player = game.Players.LocalPlayer
local PlayerGui = player.PlayerGui

if script.Parent.Text == ("BETAISRELEASED") then 
PlayerGui.Menu.MainMenu.CreditsFrame.RedeemCode.MouseButton1Click:Connect(function() 
PlayerGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = ("Succesfully Redeemed!") 
wait(2) 
PlayerGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = ("Redeem") 
end
end)

2 comments

0

it still says the same thing in the output

0

i didnt read ur question throughly.. lemme edit

if script.Parent.Text == ("BETAISRELEASED") then 
game.StarterGui.Menu.MainMenu.CreditsFrame.RedeemCode.MouseButton1Click:Connect(function() 
game.StarterGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = ("Succesfully Redeemed!") 
wait(2) 
game.StarterGui.Menu.MainMenu.CreditsFrame.RedeemCode.Text = ("Redeem") 
end)
end

you forgot to close the function lol also read the answer above. It is also useful. It's cloned into the player's PlayerGUI so that script might not work if you don't set it as game.Players.LocalPlayer.PlayerGUI.Menu

edit: sorry made a mistake script fixed

19 comments

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

i didn't read the question thoroughly.. xD

0

WTH, why did it comment like a million times

0

your script didnt work either

0

fixed it made a mistake

0

for some reason none of your guys scripts work :/

0

NONE OF YOUR SCRIPTS WORK

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