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)
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
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.
thanks.