I am trying to create an IFE System for my ROBLOX Airline, everything works except for the script that inserts the IFE Gui into the PlayerGui when you click a SurfaceGui Button.
This is my current script:
local button = script.Parent
local function onButtonActivated()
local ui = script.Parent.Parent.Parent.ifemain
local playergui = game.Players.LocalPlayer.PlayerGui
ui.Parent = playergui
end
button.Activated:Connect(onButtonActivated)
When pressing the SurfaceGui Button, nothing happens, not even anything in the script output box. How can I fix this?

31 comments
I don't want it to display on a SurfaceGui
What do you mean? If you want them to be able to press the button, you're better off putting the SurfaceGui in StarterGui
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
surface guis belong in workspace though on parts
Yeah, I know that