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

How do you make this Screen gui Works with naming the player their name with more to it?

Asked by 8 years ago
Edited 8 years ago

I need help. I was making a screen Gui for check in, for like when they clicked it the screen gui pops up and they press a button than the player is named (Player) Eco. I have put the gui in starter and made it show for that person and it didnt work I need help with this.

This is for the part being clicked

function Onclicked()
    game.Startergui.Checkin.Visible = true

end

This is the script to name the person

function OnMouseclicked()
    player.name =(player) Eco
end
`

1 answer

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

Within ROBLOX, normal users are not allowed under any circumstances to change the name of the Player object. If you want to change the name of the character, that is also not allowed when using the default character system.

A work-around is to set the head's transparency to 1, create a model in workspace with the desired name, add a humanoid into it, and copy the player's head into it. You would then weld the fake head onto the real head, and walah! it would look something like this:

head.Transparency = 1 --\\Set the original head's transparency to 1

local newHeadModel = Instance.new("Model", workspace) --\\Create a fake head model.

newHeadModel.Name = "(Player) Eco" --\\Name it.

Instance.new("Humanoid", newHeadModel) --\\Create a new humanoid.

local fakeHead = head:Clone() --\\Clone the head to create a fake head.

fakeHead.Parent = newheadModel --\\Parent the fake head.

local weld = Instance.new("Weld", fakeHead) --\\Create a weld to hold them together like glue.

weld.Part0 = head --\\The "main" part is head.
weld.Part1 = fakeHead --\\The "secondary" part is the fake Head.
0
Thank you ZachAttack123123123 13 — 8y
0
No problem. If you have any more questions just ask. RemasteredBox 85 — 8y
Ad

Answer this question