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

How do you open a Gui with Filtering Enabled?

The code below is what I have. It works in studio, but not in the game:

Server Script:

script.Parent.Parent.DialogChoiceSelected:connect(function(player,choice)
	if choice.Name == script.Parent.Name then
		wait(1)
		game.ReplicatedStorage.OpenCarGui:FireClient(player)
	end
end)

LocalScript:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local openCarGui = ReplicatedStorage:WaitForChild("OpenCarGui")

local player = game:GetService("Players").LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local function onEventFired()
	playerGui.Carshop.Enabled = true
end
 
openCarGui.OnClientEvent:Connect(onEventFired)

3 comments

0

I don't understand, are you trying to open the GUI only for one player or all players? Also, GUI's don't work using "ENABLED", it's Something.Something.Visible = true

0

No, Guis use enabled, not visible. So Carchop.Enabled = true is right.

0

Can't you do it the script way?

1 answer

I don't know how to do FilteringEnabled, but I do know a way with a script.

script.Parent.Parent.Dialog.DialogChoiceSelected:connect(player, choice)
	if choice.Name == script.Parent.Name then
		wait(1)
		local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
		playerGui.Carshop.Enabled = true
	end
end

If this doesn't meet what you want, I'm sorry, but I've only been working with scripts, not local or server scripts. Also, I still suck at scripting, so if I do something wrong, tell me and I will try to fix it. Either way, I hope this works!

3 comments

0

The question is asking how to do it with filtering enabled. This answer doesn't help with that at all.

0

Thanks for trying, but it needs to be Filtering Enabled. From what I can tell, what I'm doing should work, but it just dosen't.

0

Oh, sorry. I just wanted to help. :(

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