How would I script a ClickDetector to give a player a GUI?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? How would I script a ClickDetector to give a player a GUI?

  2. What is the issue? I am a basic scripter. I have tried multiple tutorials however they are all outdated and don’t work. I would like to make a ClickDetector give someone a GUI when they click it, but am not sure how. I have tried multiple things, that have all failed.

  3. What solutions have you tried so far? I have looked briefly on DevForum and watched multiple YouTube tutorials. I currently have this script in my part with the ClickDetector.

function onClicked()


And this script in a remote event named MyClickDetectorEvent
    game.ReplicatedStorage.StaffNotepad.Enabled = true

Thank you for your time.

local ClickDetector = script.Parent
local Event = game.ReplicatedStorage.Click
local Gui = game.ReplicatedStorage.Gui

   local GuiClone = Gui:Clone()
   GuiClone.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
1 Like

You’re honestly over complicating a fairly simple script and also Hey look another basic scripter, hi! :slight_smile:. I say you just go with a normal script, also I realised this is literally nearly the exact same as DaffyDavinko so I’m just gonna add my own touches, so you know how to do this stuff for later. (You probably do but it wont hurt to add these touches.)

local ClickDetector = script.Parent --Just the script's parent. Simple.
local MyClickDetectorEvent = game.ReplicatedStorage.MyClickDetectorEvent --Just gonna shorten it, don't want to waste much time.
local StaffNotepad = game.ReplicatedStorage.StaffNotepad --Also just shortening/simplifying the script for the GUI. 

ClickDetector.MouseClick:Connect(function() --Finds if our ClickDetector has been clicked, if it has then function.
local Clone = StaffNotepad:Clone() --Clones the GUI.
Clone.Parent  = game.Players.LocalPlayer:WaitForChild("PlayerGui") --Changes the clones parent to the Player's GUI.
end) --End.