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

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

Asked by 8 years ago

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

Log in to vote
0
Answered by
joalars2 107
8 years ago

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

0
But that changes everytime a new player joins right? fahmisack123 385 — 8y
0
Nope, not at all. It's a different connect for each player! joalars2 107 — 8y
Ad

Answer this question