here is my script, im making a npc chat script.

script.Parent.Touched:Connect(function()
	game:GetService("Players").LocalPlayer.PlayerGui.Talk.Frame.Visible = true
end)
script.Parent.TouchEnded:Connect(function()
end)

2 comments

0

LocalPlayer is a property, and you can’t use :WaitForChild() on a property. The script is pretty much waiting for a player named “LocalPlayer”. Also, LocalPlayer returns nil on server (normal) scripts.

0

thanks.