how can i show GUI to player, that wasn’t spawned yet?
I’m making Menu gui, that has deploy spawn button.
- Disable CharacterAutoLoads in Players so they don’t load automatically.
- Create a localscript in replicatedfirst that clones the menu gui and parents it to the player’s gui
3 Likes
is this script correct?
It doesn’t clone to player’s gui
local players = game:GetService("Players")
local player = players.LocalPlayer
local gui = player.PlayerGui:WaitForChild("MenuGui")
function clonegui()
local clonedgui = gui:Clone()
clonedgui.Parent = player.PlayerGui
end
players.PlayerAdded:Connect(clonegui)
It’s actually as simple as this.
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
script.MainGUI:Clone().Parent = PlayerGui
1 Like
It works! Thank you very much for helping me, fixing and shortening my script!
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.