This is the coding for the remotes:
local Events = game.ReplicatedStorage.Events local Filter = Events.Filter local change = Events.Change local namechange = game.ReplicatedFirst.ForRoleplay.NameChange local texttofilter = namechange.RPName.Text local textservice = game:GetService("TextService") Filter.OnServerEvent:Connect(function(player) textservice:FilterStringAsync(texttofilter, player) end) change.OnServerEvent:Connect(function(player) local nametag = namechange:Clone() nametag.RPName.Text = texttofilter nametag.Parent = workspace:WaitForChild(player.Name).Head end)
Coding from the localscript:
script.Parent.FocusLost:Connect(function() game.ReplicatedStorage.Events.Filter:FireServer() wait(3) game.ReplicatedStorage.Events.Change:FireServer() end)
If anyone can help that would be appreciated!
You need to get the UserId of the player
local Events = game.ReplicatedStorage.Events local Filter = Events.Filter local change = Events.Change local namechange = game.ReplicatedFirst.ForRoleplay.NameChange local texttofilter = namechange.RPName.Text local textservice = game:GetService("TextService") Filter.OnServerEvent:Connect(function(player) textservice:FilterStringAsync(texttofilter, player.UserId) -- This is how to get the userid end) change.OnServerEvent:Connect(function(player) local nametag = namechange:Clone() nametag.RPName.Text = texttofilter nametag.Parent = workspace:WaitForChild(player.Name).Head end)