You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I wanna make appear a message when player buy products -
What is the issue? Include screenshots / videos if possible!
There is no message that appear after buying -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
rewriting the whole script in another way
Here is the current code used:
local bought = game.ReplicatedStorage.BuyingCurrencyEvents.Bought
local TextColorFontSize = {
[300] = {[1]="SourceSans" ,[2] =Color3.fromRGB(101, 177, 30), [3]= "Size18",[4] =" has bought 300 Points !"};
[1000] = {[1]= "SourceSans",[2] =Color3.fromRGB(101, 177, 30), [3]= "Size18",[4] =" has bought 1,000 Points !"};
[2500] = {[1]= "SourceSans",[2] =Color3.fromRGB(212, 151, 29), [3]= "Size18",[4] =" has bought 2,500 Points !!"};
[5000] = {[1]= "SourceSansBold",[2] =Color3.fromRGB(212, 151, 29), [3]= "Size18",[4] =" has bought 5,000 Points !!!"};
[10000] = {[1]= "SourceSansBold",[2] =Color3.fromRGB(34, 212, 212), [3]= "Size18",[4] =" has bought 10,000 Points !!!!"};
[20000] = {[1]= "SourceSansBold",[2] =Color3.fromRGB(34, 212, 212), [3]= "Size18",[4] =" has bought 20,000 Points !!!!!"};
[25000] = {[1]= "SourceSansBold",[2] =Color3.fromRGB(138, 54, 212), [3]= "Size18",[4] =" has bought 25,000 Points !!!!!"};
[30000] = {[1]= "SourceSansBold",[2] =Color3.fromRGB(158, 50, 212), [3]= "Size18",[4] =" has bought 30,000 Points !!!!!!"};
[40000] = {[1]= "SourceSansBold",[2] = Color3.fromRGB(162, 44, 212), [3]= "Size18",[4] =" has bought the SUPER 40,000 Points pack !!!!!!"};
[50000] = {[1]="SourceSansBold" ,[2] = Color3.fromRGB(227, 20, 13), [3]= "Size20",[4] =" HAS BOUGHT THE LEGENDARY 50,000 POINTS PACK !!!!!!!"};
}
-- Creation of a function for speeding the process
bought.OnClientEvent:Connect(function(player,amount)
local setting = TextColorFontSize[amount]
print(player,setting)
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = player..setting[4],
Color = setting[2],
Font = Enum.Font[setting[1]],
TextSize = Enum.FontSize[setting[3]]
})
end)
Just wanna know where I’m wrong