Alright so i have tried to use this overhead filtered name system and i have followed every single step he wrote inside the script but for some reason it's still refusing to work. can anyone help me fix it / or tell me what I've done wrong? here's the script
--[[
Put this script in ServerScriptService
Commands are:
/name NAME --changes name
/show --shows name gui
/hide --hides name gui
/color COLOR --colors the name, brick color or color number works (example, /color 334 or /color Bright red)
/scolor COLOR--colors the stroke
/font FONT --changes font of text, from 1 to 7, (example, /font 5 makes your font ArialBold)
/glow COLOR --makes the name gui transform into this and back
/sglow COLOr --makes the stroke transform into this and back
Make sure you add your group's id so it knows where to pull its ranks from, if there is no groups involved, change value to nil as shown below
["GroupID"]= nil
This only works online since data store does not work offline, so if you need to test, publish in online mode
if any issues, message Edd_E
]]
local DefaultGuiSettings={
["GUI_Offset"] = Vector3.new(0,2.3,0),--players cant change this, assign this to how high the gui should be (2 studs above head)
["AlwaysOnTop"] = false, --if true, the name will be visible through walls and through hats
["SizeOfName"] = UDim2.new(4, 0,1.5, 0), -- How big the name gui above the player is
------------------------------------------------
["GroupID"]= 2648010, -- If you have a group you want to show the ranks of on the name gui, add it here, if not make it nil
------------------------------------------------
["UseNameOverGUI"] = true, --if true, then the gui inside this script will show up when hovered over players
----TEXT STROKE------
["StrokeTransparency"]=0.35, -- set default stroke transparency
----GLOWING TEXT-----
["GlowingNamesEnabledForEveryone"] = false, -- if true, then anyone can make their name glow.
["RankRequiredToGlowText"] = 200, -- anyone above rank 200 can glow their name
["GlowingNameGamepass"] = 1333337, -- anyone who has bought your gamepass here will be able to glow their name
["VIPListForGlowNames"] = {1332861,39518532} -- add people's ID's here that you want to have glow if they don't have gamepass or required rank
}
if DefaultGuiSettings.UseNameOverGUI then
script["NameChangerGUI"].Parent=game.StarterGui
end
--Save and load functions are included so players do not have to retype their names when joining the game
function LoadData(p)
local vs = script:WaitForChild("NameData"):clone()
vs.Parent = p
local Stats = vs:GetChildren()
local S1 = {}
for i=1,#Stats do
local n = Stats[i].Name
S1[n] = Stats[i].Value
end
if p.Name ~= "Player" then
local DataStore = game:GetService("DataStoreService"):GetDataStore(p.userId)
if DataStore:GetAsync("Stats") == nil then
DataStore:SetAsync("Stats", S1)
end
S1 = DataStore:GetAsync("Stats")
end
local vv = vs:GetChildren()
for i=1,#vv do
local n = vv[i].Name
if S1[n] ~= nil then
vv[i].Value = S1[n]
end
end
--If player never changed their name assign their own name as default
if S1["PlayerName"]==nil or string.len(S1["PlayerName"])==0 then
vs["PlayerName"].Value=p.Name
end
end
--Player said something functions
local NameChanger=require(game.ServerScriptService.MainModule)
NameChanger:UpdateSettings(DefaultGuiSettings)
game.Players.PlayerAdded:connect(function(p)
LoadData(p)
if DefaultGuiSettings.UseNameOverGUI then
local PlayerRankInGroup=Instance.new("StringValue",p); PlayerRankInGroup.Name="GroupRank" -- load player's rank
PlayerRankInGroup.Value=p:GetRoleInGroup(DefaultGuiSettings.GroupID)
end
p.Chatted:connect(function(txt)
NameChanger.plrChatted(p,txt)
end)
p.CharacterAdded:connect(function()
NameChanger.giveName(p)
end)
if p.Character then
NameChanger.giveName(p)
end
end)
--Player left function (save w/e changes they've done to their name)
game.Players.PlayerRemoving:connect(function(p)
local DataStore = game:GetService("DataStoreService"):GetDataStore(p.userId)
local stats = p.NameData:GetChildren()
local s1 = {}
for i=1,#stats do
local n = stats[i].Name
s1[n] = stats[i].Value
end
DataStore:SetAsync("Stats",s1)
end)
