I have a local script containing all my GUI info for a quest system.
What is supposed to happen is when you click the click detector the Gui clones to the playerGui so every player’s GUI displays different text for the quest.
My problem is the Gui won’t clone or parent to the players when the part is clicked.
local ClickDetector = script.Parent.ClickDetector
local QuestGui = game.Workspace.Bill.ClickPart.QuestGiverScript:WaitForChild("qgPartGui")
ClickDetector.MouseClick:Connect(function(clicker)
local QuestGuiClone = QuestGui:Clone()
QuestGuiClone.Parent = clicker.PlayerGui
if QuestGuiClone.Enabled == false then
QuestGuiClone.Enabled = true
end
I don’t think that is true because it has worked when the code was in a server script. Also im kinda confused by All Gui must be in a ScreenGui. (game.Players.LocalPlayer.PlayerGui.ScreenGui). I know that im just trying to clone the ScreenGui to playerGui not whats in it
If you add a print(“anything”) to the function when the clickdetector is clicked, does it print?
Whenever I try to use clickdetectors with a localscript nothing inside of it runs