I'm not the sharpest knife in the drawer when it comes to this. I got a gui in lighting and i want it to clone into a players playergui when the join my place.
local Player = game.Players.LocalPlayer local gui = game.Lighting["GUI"] function OnEnter(player) end Player.PlayerAdded:connect(OnEnter)
:clone()
does what its name says! It copies the object, and places it wherever you choose it to. For example, if you want it to clone a GUI into a Player's PlayerGui when they first join, you wouldn't need to use LocalPlayer. You can have it as a normal script in Workspace.
gui = game.Lighting["GUI"] -- doesn't need to be local game.Players.PlayerAdded:connect(function(player) gui:clone().Parent = player.PlayerGui end)