After my last question got answer (Which was very helpful btw) I want to know, how would I clone a ScreenGUI into starter gui and remove it from startgui when done. I need info like would it be a local or regular script and wiki links if possible. Thanks!
Adding and removing a gui?
3 answers
Workspace.ScreenGUI:Clone().Parent=StarterGui --assuming its in Workspace after it gets cloned the
--clone is put in starter gui
function onClicked()
--stuff
--stuff
StarterGui.ScreenGUI:Remove()--gets removed at the end
end
StarterGui.ScreenGUI.MouseButton1Click:connect(onClicked)--when screengui is clicked go to function onClicked
i am not sure if its going to be local or regular but i am leaning towards regular. http://wiki.roblox.com/index.php?title=RBX.lua.LocalScript_(Object)
clone method wiki link:http://wiki.roblox.com/index.php?title=Clone_(Method)&redirect=no
Heres a example, your information was very unformational, so I did this with your information.
time = 1
i = Instance.new("ScreenGui")
i.Parent = game.ScreenGui
wait(time)
i:remove()
5 comments
What I mean is that I have a Gui in StarterGui and I need a script that can remove it after I click a certain button on that gui
... Asking for something isnt right, if you know how to do it I will answer, your asking for scripts, you don't need help..
I was asking for wiki links -,-
BTW, time is a horrible variable to set as it is a built in function.
Its a example...
I would do something like this
Example
local waittime=3
function giveGUI(player)
if player and player.PlayerGui then
local gui=game.ServerStorage.Gui:clone()
gui.Parent=player.PlayerGui
wait(waittime)
gui:Destroy()
end
end
Usage
giveGUI(game.Players.Player1)
2 comments
The code is great and all guys but if you could simply give me wiki links to where you get this data that would be great so I can implement it in in my own way, also should this be a localscript and does it have to be in serverstorage if I made a different script that does this?
It's just application of prior knowledge, in my opinion.
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
I'll try it, thanks!
No problem ,just doing my job.
also for my script it removes the gui when you click on that gui
Where do I place the script, also can I have wiki links to where you got this info?
place the script in Workspace or serverscriptstorage
watch codeTheorem roblox game development series he got me started here is the link: https://www.youtube.com/user/bballer13snTV/playlists
serverscriptstorage would reduce lag if you used it