so I made this
`local username = game.Players.LocalPlayer.Name
script.Parent.Text = "Hello, ('"..username"')."
`
and it doesn't seem to be working
You did a very simple mistake. You forgot the two dots ('..') in the end of the word 'username'. The correct way is:
local username = game.Players.LocalPlayer.Name script.Parent.Text = "Hello, ('"..username.."')."
Make sure it's a Local Script and if it is use the script below:
local Username = game.Players.LocalPlayer local TextLabel = script.Parent.TextLabel TextLabel.Text = "Hello, ('"..Username.Name.."') -- If you want to filter the text: local TextService = game:GetService("TextService") local filteredTextResult = TextService:FilterStringAsync(text, fromPlayerId) TextLabel.Text = "Hello, ('"..Username.Name.."')
https://developer.roblox.com/en-us/articles/Text-and-Chat-Filtering -- More info about filtering.