I'm trying to make an npc activate a script that is in game.players.LocalPlayer.PlayerGui.GuiName but the script give me the next error
Script:2: attempt to index field 'LocalPlayer' (a nil value)
script
script.Parent.NPCTalk.OnServerEvent:connect(function(player)
local plrGui = game.Players.LocalPlayer.PlayerGui
plrGui.Talk.Disabled = false
end)
KeyBind Script

2 comments
You cannot access LocalPlayer from the server - you would instead use the provided player argument. Furthermore - you cannot access PlayerGui either afaik. Make UI changes on the client.
can you explain me how