Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why my script Give me Local player error? [closed]

Asked by
DGP2001 -18
6 years ago
Edited 6 years ago

I'm trying to make an npc activate a script that is in game.players.LocalPlayer.PlayerGui.GuiName but this give me error 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)

Closed as Too Broad by User#19524

This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.

Why was this question closed?