local CD = script.Parent
local Zone1Purchase = game.Players.LocalPlayer:WaitForChild("PlayerGui").Zone1Purchase
CD.MouseClick:Connected(function()
print("The ClickDetector has worked ")
Zone1Purchase.Enabled = true
end)
Hello, I am having an issue with a click detector script when the player clicks a part I have in the game
the click detector function should run and enable the Zone1Purchase UI which is currently Not enabled
,but for some reason the UI did not enable
local Zone1Purchase = game.Players.LocalPlayer.PlayerGui:WaitForChild("Zone1Purchase")
CD.MouseClick:Connect(function()
print("The ClickDetector has worked ")
Zone1Purchase.Enabled = true
end)
Changed the zone1Purhcase value to have a waitforchild on the screengui.