Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How To Change Characters Name Through Script?

Asked by 4 years ago

Anybody who plays Party.exe will get what I mean. You know how in explorer you can name an NPC and the name will show above it in studio, and in game? I can't figure out how to make him talk through the name, I don't know how to change the name through script. Can anybody help me out? I want to use the name appearing above him as a way of having him talk, in my opinion it looks better than those dialog bubbles studio offers. If you want I can provide a link to the game. I just need their names to be able to change for awhile as a form of talking. https://web.roblox.com/games/4790319571/Work-exe?refPageId=904328cd-e0f9-4034-a44d-304aade2a47e

0
If you do think of an answer, please simplify it, i'm very new to coding. Or1g1nal_Player 22 — 4y
0
you can access and change a model's name by doing MODEL.Name Kyokamii 133 — 4y
0
Also, the name appears above the head if the model contains a Humanoid and a part named "Head". Kyokamii 133 — 4y

4 answers

Log in to vote
1
Answered by 4 years ago

Neither work

0
Nice. marine5575 359 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Simple, just do .Name like so

script.Parent.MouseButton1Click:Connecr(function()
    Whatever.the.character.is.Name = NewName -- this could be localplayer, but u need to reference it from the local side if it is
end)

Change the function from a click to whatever u want, idk if this works but try it

0
by the way not trying to bust but when you put in connect you accidentally put an r so original player just replace the connecr with connect ayuu_ondev 60 — 4y
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
local character = workspace:FindFirstChild("CharacterName") -- INSERT CHARACTER NAME HERE

local text = {"INSERT TEXT HERE"}
local WAIT_TILL_DEFAULT_NAME = {2} -- How long you want to wait after the text has been completed for it to return to the character's original name
local ORIGINAL_CHARACTER_NAME = {"John Doe"} -- What was your characters original name, the reason being ^

-- Insert whatever function you want that will trigger this, be sure to add a end) at the end of the script-paragraph depending if it's a loop or a function
-- I will add a while loop to satisfy my OCD
while true do
    for i = 1, #text do
        character.Name = string.sub(text, 1, i)
        wait(0.04)
    end
    wait(WAIT_TILL_DEFAULT_NAME[1])
    character.Name = ORIGINAL_CHARACTER_NAME[1]
end

0
My answer made the name go like a typewriter, animated text. AcrylixDev 119 — 4y
0
Where do I put this script? Or1g1nal_Player 22 — 4y
0
In serverscriptservice. AcrylixDev 119 — 4y
0
I edited the script, made a mistake 16h's ago AcrylixDev 119 — 4y
Log in to vote
0
Answered by 4 years ago

First of all create a normal script, then insert the following


game.Players.PlayerAdded:Connect(function(player) -- Does something when a player joins. player.Name = "Insert the name :D" -- Player.Name is basically the name of the player! end)

I know this has got nothing with your answer to do but you can also change other things of the player, Forinstance


game.Players.PlayerAdded:Connect(function(player) print(player.AccountAge) if player.AccountAge == 2006 then print("You are a roblox veteran") end end)

And other cool things.

If there are any errors please re-comment

Answer this question