Okay so, i recently found out that people can color their Descriptions in my game using a strange glitch? now this is a problem because only our admins use the colored names etc, and even my friend thought a person with a color bio was an admin at first, so its a big issue…
the problem is i have no idea how to fix this or where to even start, ive tried looking it up but it doesnt seem like theres anything on it.
this is what the person said colored their bio:
and this is our naming script if anyone has any ideas how to prevent this:
Local side
script.Parent.FocusLost:Connect(function()
if script.Parent.Text ~= nil and script.Parent.Text ~= "" then
game.ReplicatedStorage.RPDESC:FireServer("Rpdescription", script.Parent.Text)
else
game.ReplicatedStorage.RPDESC:FireServer("Rpdescription", script.Parent.Text == " ")
end
end)
script.Parent.Changed:Connect(function()
script.Parent.Text = script.Parent.Text:sub(1,255)
end)
server side
local text = game:GetService("TextService")
local Players = game:GetService("Players")
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if not Character.Head:FindFirstChild("Description") then
repeat wait() until Character.Head ~= nil
local nametag = game:GetService("ServerStorage").Descendants.Description:Clone()
nametag.Parent = Character.Head
nametag.TextLabel.Text = " "
end
Character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
Character.Humanoid.NameDisplayDistance = 0
end)
end)
game.ReplicatedStorage.RPDESC.OnServerEvent:Connect(function(x, argument, newname)
repeat wait() until x.Character
if argument == "Rpdescription" then
local s, e = pcall(function()
newname = text:FilterStringAsync(newname, x.UserId):GetChatForUserAsync(x.UserId)
end)
if not s then warn(e) end
x.Character.Head.Description.TextLabel.Text = newname
end
end)