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

Script works, but GUI show up after being enabled? Using new roblox dialogue edior.

Asked by 6 years ago
Edited 6 years ago

I'm using Roblox's new dialogue editor, and you can make functions when a player clicks a response, which I've done. However, the code I'm using is working fine, because it goes to the position I want it to, it's just not showing up at all. I can't see it.

return function(player, dialogueFolder)
local Gui = game.StarterGui.GUI 
    Gui.Enabled = true
    Gui.Frame:TweenPosition(UDim2.new(0.5, -200, 0.5, -250), 'Out',  'Sine', 1)
end

(First post on this website FYI.)

0
Are you actually calling the function? (Considering it''s returned, so I'm assuming it's coming from either a ModuleScript or it's inside another function) optiplex123 21 — 6y
1
Each player has a GUI folder called the PlayerGui. That is what they see. The StarterGui is what you see in Studio, and what is replicated (copied) to all players in the server upon joining or respawning, so you would change it in the PlayerGui. If this is a LocalScript, use script.Parent.Parent etc.. UgOsMiLy 1074 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

here is the fix for your script :

return function(player, dialogueFolder)
local Gui = game.Players.LocalPlayer.PlayerGui.GUI --Make sure it's local script
    Gui.Enabled = true
    Gui.Frame:TweenPosition(UDim2.new(0.5, -200, 0.5, -250), 'Out',  'Sine', 1)
end

You should know more about gui :

We create gui in StarterGui But after a player joins The Childs of StarterGui be cloned to game.Players.LocalPlayer.PlayerGui Every Player see that gui that's inside that player's gui, That's what make us able to build deferent gui for every player.

0
Thanks, I'm not sure if it will work as I don't know if the editor uses local script for the functions.. Twenty1chickens 4 — 6y
0
I told to use local script because only local script has thevalue of LocalPlayer, if you can't make it in a local script then in line to you will have to type player's name in the place of LocalPlayer, So local script would be better. TheSkyofIndia 150 — 6y
Ad

Answer this question