I'm trying to make a part that you have to insert an answer into. I added a ScreenGUI to starterGUI, and added this localscript to open it when you click on the script's parent.
local function onMC(playerwhoclicked) playerwhoclicked.PlayerGui.submit.TextBox.Visible = true playerwhoclicked.PlayerGui.submit.TextButton.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onMC)
The problem is, the script doesn't open anything. Also, none of the errors in console link to the script when clicked on. Keep in mind, I don't know anything about localscripts other than that they are scripts that are local.
--Place your gui in server storage local name="ScreenGui" -- Place the name of your Gui here function onclick(plr) local x = game.ServerStorage.name:Clone() x.parent = plr.PlayerGui --if your button is derectly in a screen gui then it whould be better if you type x.parent = script.Parent.Parent.Parent end script.Parent.ClickDetector.MouseButton1Click:Connect(onclick)
There can be mistakes in this script, if you find mistake please fix it, hope script help. And place it in normal script not in local script.