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

How to make a Gui open/Close For FilteringEnabled?

-- i make a gui but dont work for filtering enabled :c. SomeoneHelp me?
local menu = script.Parent.Parent
local menu2 = script.Parent.Parent.Parent.Multiplayer
local MenuSonido = script.Parent.Parent.MenuSonido
local SonidoClick = script.Parent.Parent.SonidoClick
local button = script.Parent
local text = script.Parent.Body

button.MouseEnter:connect(function()
		if not inside then
			inside = true
			button.BackgroundTransparency = 1
			text.TextColor3 = Color3.new(255,255,255)
			button.Position = button.Position + UDim2.new(0.05, 0, 0, 0)
			button.BorderSizePixel = 5
			MenuSonido:play()
			
			
		end
	end)
	button.MouseLeave:connect(function()
		if inside then
			inside = false
			button.BackgroundTransparency = 1
			text.TextColor3 = Color3.new(255/40, 170/255, 0/255)
			button.Position = button.Position - UDim2.new(0.05, 0, 0, 0)
			button.BorderSizePixel = 0
		end
	end)
	button.MouseButton1Click:connect(function()
		SonidoClick:play()
		menu.Visible = false
		menu2.Visible = true
	end)
	

6 comments

0

Where is the script? Is this a LocalScript in the StarterGui? Does it work in studio but not in game?

0

la secuencia de comandos se encuentra en el botón de texto para abrir la interfaz gráfica de usuario. El Gui está en StarterGui y si funciona en Roblox Studio, pero en el juego no es

0

You used Color3.new wrong, it only takes arguments between 0 and 1

0

Do you have A discord To help me? Pls

0

Use a local script to get it from ReplicatedStorage OnClientEvent and a server script to get it from the server to the client

0

I put the script in a localScript and it did not work. I think I need to put a RemoteEvent like this local Client = game: GetService ("ReplicatedStorage")

1 answer

✓ Accepted answer
-- LocalScript 
local remote = game:GetService("ReplicatedStorage").YourGui -- name it


remote.OnClientEvent:Connect(function()
    script.Parent.Visible = true
end)
-- Server
local remote = game:GetService("ReplicatedStorage").YourGui

local function click(player) 
  remote:FireClient(player) -- fire to client
end 

script.Parent.ClickDetector.MouseClick:Connect(click)

1 comment

0

Sorry for the layout...those are two separate scripts, Local and Server

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