I want to make a RNG game, which is working from my previous topics, but if the player rolls 1/1k to 1/9.99k, I want to display the message in all cilents to let them know a player has rolled the amount.
Firing Script:
local chat = game.ReplicatedStorage.ChatEvents.Chat
chat.OneIn1K:FireAllClients(plr, index[2])
StarterCharacterScript:
local c = game.ReplicatedStorage.ChatEvents.Chat
local FormatNumber = require(game.Workspace.FormatNumber.Main)
local formatter = FormatNumber.NumberFormatter.with()
c.OneIn1K.OnClientEvent:Connect(function(plr, index[2]) -- Error Line
if index[2] >= 1000 then
local displayer = formatter:Format(index[2])
local Message = (plr.Name.." has rolled an 1/"..displayer.."!") -- I can't figure out how to chance the text color to gold, too
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(Message)
end
end)
But. I’m getting this weird error Expected ')' (to close '(' at column 41), got '['. I cannot explain this and I can’t see what’s wrong with that. Help is appreciated!