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

GUI won't open in Filtering Enabled?

I've been working on converting one of my projects to filtering enabled. but I'm having an issue with a gui opening. There is a local script inside of the gui that opens it, and a local script inside of starterplayerscripts that connects a remote event. I use prints in both of these scripts, but only the one in starterplayerscripts will print anything, and when I reset and click it, it won't print anything either.

Script in starterplayerscripts:

local Player = game.Players.LocalPlayer
local Open = Player.PlayerGui:WaitForChild("SkillGui").SkillB


Open.MouseButton1Click:connect(function()
	print("Clicked")
	Open.OpenScript.Open:FireServer()
	print("Fired")
end)

Script in Gui:

script.Open.OnServerEvent:connect(function()
	print("Visible")
	script.Parent.Parent.Skills.Visible = true
end)

(remote event is inside of the script in the GUI)

1 comment

0

The script that you're using for your server event is on the client. Remote functions are for client-server communication. For what you're doing specifically, you can just handle opening your GUI in your MouseButton1Click event, no need for the Remote Event.

1 answer

✓ Accepted answer

How about one script...

local Player = game.Players.LocalPlayer
local Open = Player.PlayerGui:WaitForChild("SkillGui").SkillB


Open.MouseButton1Click:connect(function()
    print("Clicked")
    local scriptthing=Open.OpenScript
scriptthing.Parent.Parent.Skills.Visible=true
    print("Ran")
end)


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