local EventsFolder = game.ReplicatedStorage.CodeEvents
local RedeemCode = EventsFolder.RedeemCode
local FeedbackEvent = EventsFolder.Feedback
local MainFrame = script.Parent.HolderBG
local RedeemButton = script.Parent.HolderBG.Holder.RedeemBG.Redeem
local CodeBox = script.Parent.HolderBG.Holder.CodeBox
local PreviousCode = script.Parent.HolderBG.Holder.PreviousCode
local Close = script.Parent.HolderBG.Holder.Close
local player = game.Players.LocalPlayer
local Blur = Instance.new("BlurEffect",game.Workspace.CurrentCamera)
Blur.Name = "CodeGuiBlur"
Blur.Size = 0
local RunService = game:GetService("RunService")
RedeemButton.MouseButton1Click:Connect(function()
local Redeemed = EventsFolder.RedeemCode:InvokeServer(CodeBox.Text)
if Redeemed == true then
print(player.Name.." has redeemed the "..CodeBox.Text.." code!")
end
end)
FeedbackEvent.OnClientEvent:Connect(function(Message, MessageColor, TheCode, CodeAccepted)
CodeBox.Text = Message
CodeBox.TextColor3 = MessageColor
if CodeAccepted == true then
PreviousCode.Text = PreviousCode.Text .." "..TheCode
end
end)
RunService.RenderStepped:Connect(function()
if CodeBox.Text == "" then
CodeBox.TextColor3 = Color3.fromRGB(255, 255, 255)
end
end)
✓ ANSWER ACCEPTED
attempt to concatenate string with table? line 27
1 answer
✓ Accepted answer
Hey Philipceo90,
Line 27 needs a bit of tweaking. You should replace the line with this new line of code.
PreviousCode.Text = PreviousCode.Text .." "..tostring(TheCode)
In this example, we are turning a table into a string using tostring() to get us a string value instead of a table.
If this is the correct answer please mark it as correct,
Cheers,
orcazate
This discussion is preserved as it was. New answers, comments, and votes are closed.
