How do i clone gui only once for each player in game

ight imma head out, idk what to tell you I provided you with the options and explained how they work in previous posts

I know that :slight_smile: I used it as example that you only need server script

i used that, and i showed you an image of what happened

this is a funny forum post that shouldā€™ve ended ages ago

2 Likes

at this point we will get to 69+ replys

1 Like

Okay iā€™ll post what you can do that will work one last time (this is the third time Iā€™m posting the same thing)


-- server script
game.Players.PlayerAdded:Connect(function(player)
     Remote:FireAllClients(player) -- pass which player joined
end)

on the client

-- local script
remote.OnClientEvent:Connect(function(player)
    -- now we can do whatever we want and use the "player" value that was passed through
    -- that can be making a gui, a billboard gui, or just using the player's name for something, we can do literally whatever th we want here.
end)

wonder if this will actually work or if they will try smth different

1 Like

Tbh I donā€™t really care anymore. What else you want from me, I explained how remote events work, I explained how the server replicates things. I explained everything. And I even posted code how to do it.

the same thing is happening. I showed you an image of what was happening

never said I wanted anything from you im just saying that this is getting long at we got to 69+ replys now
amazing

Okay I am making a place file and writing the entire code along with example gui frames. I will post it in a couple minutes.

I was saying ā€œyouā€ as in the NotZylon, not you as in D0RYU :joy:

oh sorry, harder to understand people when you arenā€™t talking irl :sweat_smile:

Okay, Iā€™ve provided 2 examples in this, use option1
Gui-Example.rbxl (34.5 KB)

So apparently playerAdded now works on the client, the API page says it was added recently, so in option1 you just playerAdded on the client.


I also added a second script called option2 which just shows how a RemoteEvent works, you shouldnā€™t use it though.


@D0RYU no problem

Edit: itā€™s on the client, yikes. Iā€™ll try to see if I can make a similar code for the client.

local LocalPlayer = game:GetService(ā€˜Playersā€™).LocalPlayer
local tradingTemplate = game:GetService(ā€˜ReplicatedStorageā€™):WaitForChild(ā€˜Templatesā€™):WaitForChild(ā€˜TradingFrameā€™)

local newTemplate = tradingTemplate:Clone()
newTemplate.Parent = LocalPlayer:WaitForChild(ā€˜PlayerGuiā€™)
newTemplate:WaitForChild(ā€˜playerNameā€™).Text = LocalPlayer.Name
end

Also, Iā€™d recommend you put it in a ScreenGui with the ResetOnSpawn property set to false so you donā€™t have to clone it every once in a while.