You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? How would I script a ClickDetector to give a player a GUI?
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.
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()
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
game.Workspace.MyClickDetectorEvent.Script()
And this script in a remote event named MyClickDetectorEvent
game.Workspace.MyClickDetectorEvent.OnServerEvent:Connect(function()
game.ReplicatedStorage.StaffNotepad.Enabled = true
end)
You’re honestly over complicating a fairly simple script and also Hey look another basic scripter, hi! . 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.