Hi! A game I’m working on has a nickname selection screen that allows players to choose their nickname, color as it appears, and font (the color and font will appear on an overhead gui). To do this, I have been getting the data from the gui with a remote event, then taking that data and creating a folder of values in the player. This method has been working for both the nickname text and the color selected, but when the string value is created for the font type, there is no value.
Here is the local script text in the submit button:
local remoteEvent = game.ReplicatedStorage.ClientToServer.NicknameChosen
local box = script.Parent.Parent.TextBox
local button = script.Parent
local colorSelection = script.Parent.Parent.Colors.Selection
button.Activated:Connect(function()
local text = box.Text
remoteEvent:FireServer(text, colorSelection.BorderColor3, box.Font)
print("Sent")
end)
And here is the part of a script in server script service that receives the event:
client.NicknameChosen.OnServerEvent:Connect(function(player, name, color, font)
local nameItems = Instance.new("Folder", player)
nameItems.Name = "NameItems"
local nickname = Instance.new("StringValue", nameItems)
nickname.Name = "Nickname"
nickname.Value = name
local ncolor = Instance.new("Color3Value", nameItems)
ncolor.Name = "Color"
ncolor.Value = color
local namefont = Instance.new("StringValue", nameItems)
namefont.Name = "Font"
namefont.Value = font
end)
It gives me the error:
09:27:05.907 ServerScriptService.Main:27: invalid argument #3 (string expected, got EnumItem) - Server - Main:27
How can I send the font value, either as a string value or as something else so that I can use it to create the overhead gui?