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

How do you manipulate Gui with Filtering Enabled on?

Asked by
thortol 22
6 years ago
Edited 6 years ago

I read online that you have to use a remote event but it doesn't work. This script is supposed to make the button clicked turn blue when clicked. It works when filtering enabled is off.

script:

   script.RemoteEvent.OnServerEvent:connect(function(player)

local gui = player.PlayerGui.ScreenGuimain.ScrollingFrame.ImageButton1

gui.BackgroundColor3 = Color3.new(0,0,255)

    end

    end)

local script:

   script.Parent.MouseButton1Down:connect(function()
   script.Parent.Gui1.RemoteEvent:FireServer()

   end)

1 answer

Log in to vote
0
Answered by 6 years ago

Since you are editing a GuiObject, you don’t need a RemoteEvent. So just do this code all under a LocalScript

script.Parent.MouseButton1Click:Connect(function()
    -- Do code here
end)
Ad

Answer this question