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

Having a problem with surface guis not opening/moving/enabling, how do I fix this?

Asked by 4 years ago

This problem also happens with screen guis.

Whenever I try to tween or activate another gui with a gui using scripts, it doesn't work. Nothing is working for me. Is it a bug or am I missing something?

https://www.youtube.com/watch?v=yssjbNuBSgc&feature=youtu.be

Here's my code.

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.Position = {0, 25},{0, 591}
    script.Parent.Parent.Parent.Parent.USERINTERF.Frame.Position = {0, 25},{0, 25}
end)

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

it is a little bit complicated. you have to make it working by yourself. it is not one script's problem.

LOCALSCRIPT DOES NOT WORK IN WORKSPACE PARTS! so that is a lot of things to work around. keep this in mind, this is what you need to do,

  1. create a ClickDetector under button, set parent to button,

  2. put the whole screen GUI in replicated storage

  3. create a script for the login button, define a mouseclick event function for click detector,


ClickDetector.MouseClick:Connect(function(player) local gui = game.ReplicatedStorage.YourLoginMenu:Clone() gui.Parent = player.PlayerGui gui.Enabled = true end)

so when you click the button, the clickDetector of that button got triggered, it runs a function copy the gui from somewhere else to your player.

0
Hm, still isn't working. I click the button on the surface gui and it doesn't open the screen gui. sourcandiezz 0 — 4y
Ad

Answer this question