Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make something like a "Private Surface GUI"?

I AM NOT ASKING FOR A COMPLETE SCRIPT

Hi guys!

I've been wondering for a while, how can I put the player's name on a SurfaceGui and not let any others see? If you're confused, loleris managed to do it in Mad Murderer with the Points Shop, where no one but myself could see how many points/coins I had. I want to do something like that, but I don't know how to start.. Any tips?

1 answer

Pretty sure you need a local part or smth

Example: i know you didnt ask for a full code, but you need an example

game.Players.PlayerAdded:connect(function(player) --Runs when player joins
	player.CharacterAdded:connect(function(char) --Makes code inside run whenever player respawns
		local bin = Instance.new("Camera",char)
		
		local part = Instance.new("Part",bin)
		local sgui = Instance.new("SurfaceGui",part)
		local label = Instance.new("TextLabel",sgui)
		
		label.Text = "Hi! Your name is: "..player.Name
	end)
end)

I might be wrong, this isnt my specialty, really.

Worth a shot tho! :D

2 comments

0

But that changes everytime a new player joins right?

0

Nope, not at all. It's a different connect for each player!

This discussion is preserved as it was. New answers, comments, and votes are closed.