Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

1 comment

0

Hm, still isn't working. I click the button on the surface gui and it doesn't open the screen gui.

This discussion is preserved as it was. New answers, comments, and votes are closed.