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

Frame won't become visible, what's wrong with my script?

** Please note I have filtered enabled on **

--// Local Script

--// Variables
local Button = script.Parent.TextButton
local visibleOptions = game.ReplicatedStorage:WaitForChild("visibleOptions")

--// Scripting
Button.MouseButton1Click:Connect(function()
	visibleOptions:FireServer()
end)

--// Script

--// Variables
local visibleOptions = game.ReplicatedStorage:WaitForChild("visibleOptions")

--// Scripting
visibleOptions.OnServerEvent:Connect(function(player)
	player.PlayerGui.optionsGui.Frame.Visible = true	
end)

https://i.imgur.com/3jEmBcc.png // photo of explorer

1 answer

With FE off, you don't need that much. You can do everything in the LocalScript. Here, delete the Script, and put this in the LocalScript:

repeat wait() game.Players.LocalPlayer:WaitForChild("PlayerGui") --Roblox Bug :I

--// Variables
local Button = script.Parent.TextButton
local visibleOptions = game.ReplicatedStorage:WaitForChild("visibleOptions")

--// Scripting
Button.MouseButton1Click:connect(function() --I'm not sure if you need, but always put "connect" with lower case.
    game.Players.LocalPlayer.PlayerGui.optionsGui.Frame.Visible = true
end)

If this works, mark as the solution please!

As always, good scripting!

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