so im trying to make a gui show up (this is in a server script, I tried it in a local too, also I used player gui in a local too)
Dialo1 = game.StarterGui.Dialogue.Whats1
wait(1)
Dialo1.Visible = true
print(“dialo”)
(I get no errors and the last print, prints)
1 Like
coolifysz
(coo1ify ok)
November 22, 2023, 5:14am
#2
Use PlayerGui, on a local script, Dialo1 should be
Dialo1 = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Dialogue"):WaitForChild("Whats1")
This is because StarterGui is just basically used as a “copying sheet” and will be copied and implemented into the player’s OWN gui, so using StarterGui will mean nothing.
2 Likes
read my parentheses lol
()()S()S()()()( - 30 WORD LIMIT
1 Like
As @coolifysz has implied, what you’re doing is accessing the StarterGui, not the Gui the player has. The starterGui is cloned into the playerGui but doesn’t have anything to do with the playerGui once a player has entered the game.
1 Like
It is working because the script is doing what you have told it to do. However, the Gui you’re changing doesn’t belong to the player so you won’t notice anything.
1 Like
coolifysz
(coo1ify ok)
November 22, 2023, 5:19am
#6
My fault, but did you try my solution first?
1 Like
coolifysz
(coo1ify ok)
November 22, 2023, 5:20am
#9
Ah, check your explorer first. That means something is missing.
1 Like
Put into a local script:
local Dialo1 = game:GetService("Players").LocalPlayer.PlayerGui.Dialogue.Whats1
wait(1)
Dialo1.Visible = true
print(“dialo”)
3 Likes
coolifysz
(coo1ify ok)
November 22, 2023, 5:23am
#12
^^^
Yeah that will help, but use WaitForChild still, it will lower the chances of your code from breaking. I made a mistake in my code.
2 Likes
Credit goes to @coolifysz , he had the right idea, but forgot the LocalPlayer part!
4 Likes
I’m not quite sure where your script is located, but if it works, just put a local script in your GUI and run
Dialo1 = script.Parent
task.wait(1)
Dialo1.Visible = true
print(Dialo1.Visible)
out of all of them this one worked
3 Likes
Yes, @coolifysz had the solution first tho, you can mark his answer as the solution. TY!
3 Likes
Is the gui set to enabled? If it isn’t, the following code will not work.
1 Like
however only yours worked
30 word limiteeee
system
(system)
Closed
December 6, 2023, 5:54am
#19
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.