Im trying to make where you can talk to npcs, im trying to figure out why this local script wont enable the Gui, i added prints too it said it worked, here is the script.
local clickDetector = game.Workspace.yuiigui.ClickDetector
local YuiiGui = game.StarterGui.Yuii
if game.StarterGui.Yuii.Enabled == false then
function onMouseClick()
print("touched me")
wait()
YuiiGui.Enabled = true
print("it worked")
end
clickDetector.MouseClick:connect(onMouseClick)
end
it is located at StarterPlayerScripts, i have no idea why it wont enable it.

2 comments
StarterGui is a replication Container, it doesn't house the active user-interfaces, reference PlayerGui instead.
Thanks