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

How to make a Gui open/Close For FilteringEnabled?

Asked by 6 years ago
-- 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)

0
Where is the script? Is this a LocalScript in the StarterGui? Does it work in studio but not in game? vanilla_wizard 336 — 6y
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 Xx_andresXx 7 — 6y
0
You used Color3.new wrong, it only takes arguments between 0 and 1 User#19524 175 — 6y
0
Do you have A discord To help me? Pls Xx_andresXx 7 — 6y
View all comments (2 more)
0
Use a local script to get it from ReplicatedStorage OnClientEvent and a server script to get it from the server to the client ABK2017 406 — 6y
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") Xx_andresXx 7 — 6y

1 answer

Log in to vote
0
Answered by
ABK2017 406 Moderation Voter
6 years ago
-- 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)
0
Sorry for the layout...those are two separate scripts, Local and Server ABK2017 406 — 6y
Ad

Answer this question