Hello, I am making a Term for a group. So there is a model Called Term (Which is in Workspace). Inside there is a part called as Beam and inside the beam there is a script called as Script. So inside the script there is an GUI. The GUI tells how much time is left or who won and all. I created a separate local script and added this command.
local player = game.Players.LocalPlayer.PlayerGui gui = script.Parent.Script.CaptureGUI:Clone() gui.Parent = player
But sadly, It does not copy it. There is a no error in the output. Can someone tell me the problem? The name of the GUI is correct. If you could can answer as fast as possible it would help me out :)
script.Parent.Script.CaptureGUI:Clone().Parent = game.Players.LocalPlayer.Playergui
It could be that PlayerGui
is not loading in time, the occupation of :WaitForChild
A redundant method, could help.
local player = game.Players.LocalPlayer:WaitForChild("PlayerGui") gui = script.Parent.Script.CaptureGUI:Clone() gui.Parent = player
If this doesn't seem to work, try rechecking your code syntax.