Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I Want To Update My Gui Using A Require How Do I Do That?

Asked by 4 years ago

I Want A Script To Update (Or Run The Require Again) My Gui Using A Require But Before The Gui Updates I Made Another Gui That Says There Is A Update To The Gui And They Should Press The Update Button To Update The Gui. I Tried A Few SCript But Non Of Them Worked Here Is My Code:

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.Parent.Parent:Destroy()
    require(3882147708)
end)

It Also Destroy's The Original Gui But Still Runs The Require(The Gui Goes Into The Starter Gui Folder Btw) And I Want The Gui To Go Back Into The Players Gui When It In The Starter Gui But I Cant Get It To Work Please Help Me Out

1 answer

Log in to vote
0
Answered by 4 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

Do this.

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.Parent.Parent:Destroy()
if not script.Parent then
-- nothing
else
    require(3882147708)
end
end)
0
it worked but even tho the gui is in the starter gui i dont get my gui on my scsreen you think you can help with that? mahid786 41 — 4y
0
Hm maumaumaumaumaumua 628 — 4y
0
have you found a way to do it yet? mahid786 41 — 4y
0
ah yes maumaumaumaumaumua 628 — 4y
View all comments (4 more)
0
User PlayerAdded event, store the gui in ServerStorage, and when the playeradded event is fired, clone that gui and parent it to the player's PlayerGui object. maumaumaumaumaumua 628 — 4y
0
do i have to make the player rejoin? mahid786 41 — 4y
0
Use teleport Service:TeleportToPlaceInstance(), Also use game.JobId so it chooses the SAME server and not a random server maumaumaumaumaumua 628 — 4y
0
ok thanks mahid786 41 — 4y
Ad

Answer this question