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

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

Asked by 4 years ago

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 <eof>

3 answers

Log in to vote
0
Answered by
bluzorro 417 Moderation Voter
4 years ago
Edited 4 years ago

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
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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)
0
it still says the same thing in the output JAX_AtRB -1 — 4y
0
i didnt read ur question throughly.. lemme edit User#23252 26 — 4y
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
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

0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
View all comments (15 more)
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
i didn't read the question thoroughly.. xD User#23252 26 — 4y
0
WTH, why did it comment like a million times User#23252 26 — 4y
0
your script didnt work either JAX_AtRB -1 — 4y
0
fixed it made a mistake Decryptional 15 — 4y
0
for some reason none of your guys scripts work :/ JAX_AtRB -1 — 4y
0
NONE OF YOUR SCRIPTS WORK JAX_AtRB -1 — 4y

Answer this question